Skip to content

Commit f9dfa3a

Browse files
authored
refactor(tabs): Match design to the latest Web Components repo changes (#15029)
1 parent a197299 commit f9dfa3a

File tree

4 files changed

+34
-18
lines changed

4 files changed

+34
-18
lines changed

projects/igniteui-angular/src/lib/core/styles/components/tabs/_tabs-theme.scss

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@
458458
&:hover,
459459
&:focus {
460460
background: var-get($theme, 'item-active-background');
461-
color: var-get($theme, 'item-active-color');
461+
color: if($variant == 'fluent', var-get($theme, 'item-hover-color'), var-get($theme, 'item-active-color'));
462462

463463
igx-icon {
464464
color: var-get($theme, 'item-active-icon-color');
@@ -473,16 +473,25 @@
473473
background: var-get($theme, 'item-active-background');
474474
position: relative;
475475
box-shadow: inset 0 0 0 rem(1px) var-get($theme, 'border-color');
476+
z-index: 1;
476477

477-
&::after {
478-
content: '';
479-
position: absolute;
480-
bottom: 0;
481-
inset-inline-start: 0;
482-
width: 100%;
483-
height: rem(1px);
484-
background: var-get($theme, 'item-active-background');
485-
z-index: 1;
478+
&:not(:focus) {
479+
&::before {
480+
content: '';
481+
position: absolute;
482+
bottom: 0;
483+
inset-inline-start: 0;
484+
width: 100%;
485+
height: rem(1px);
486+
background: linear-gradient(
487+
to right,
488+
var-get($theme, 'border-color') 1px,
489+
var-get($theme, 'item-active-background') 1px,
490+
var-get($theme, 'item-active-background') calc(100% - 1px),
491+
var-get($theme, 'border-color') calc(100% - 1px)
492+
);
493+
z-index: -1;
494+
}
486495
}
487496

488497
&:hover {
@@ -500,11 +509,6 @@
500509
&:hover,
501510
&:focus-visible {
502511
background: var-get($theme, 'item-hover-background');
503-
color: var-get($theme, 'item-hover-color');
504-
505-
igx-icon {
506-
color: var-get($theme, 'item-hover-icon-color');
507-
}
508512
}
509513
}
510514
}
@@ -638,6 +642,7 @@
638642
@include type-style($label) {
639643
margin-top: 0;
640644
margin-bottom: 0;
645+
@content;
641646
}
642647
}
643648
}

projects/igniteui-angular/src/lib/core/styles/typography/_indigo.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@
104104
));
105105
@include tabs-typography($categories: (
106106
label: 'subtitle-2',
107-
));
107+
)) {
108+
--ig-subtitle-2-text-transform: uppercase;
109+
};
108110
@include time-picker-typography($categories: (
109111
header-hour: 'h5',
110112
selected-time: 'h6'

src/app/tabs/tabs.sample.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ <h3 class="sample-title">Different size tabs</h3>
3030
<span igxTabHeaderLabel>{{tab2Label}}</span>
3131
</igx-tab-header>
3232
<igx-tab-content>
33-
<div class="sample-scrollable">
33+
<div class="sample-list">
3434
<igx-list [allowRightPanning]="true" [allowLeftPanning]="true">
35-
<igx-list-item igxRipple="pink" igxRippleTarget=".igx-list__item"
35+
<igx-list-item igxRipple="pink" igxRippleTarget=".igx-list__item-base"
3636
*ngFor="let contact of contacts">
3737
<igx-avatar igxListThumbnail [src]="contact.avatar"></igx-avatar>
3838
<p igxListLineTitle>{{contact.text}}</p>

src/app/tabs/tabs.sample.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,12 @@
3131
font-size: 20px;
3232
font-weight: 900;
3333
}
34+
35+
.sample-list {
36+
padding: 16px;
37+
background: var(--ig-gray-50);
38+
}
39+
40+
.igx-list__item-base {
41+
position: relative;
42+
}

0 commit comments

Comments
 (0)