Skip to content

Commit 90f7694

Browse files
committed
feat(tabs): set up the newly created 'active' parameters
1 parent 9290512 commit 90f7694

File tree

5 files changed

+29
-27
lines changed

5 files changed

+29
-27
lines changed

src/components/tabs/themes/shared/tab/tab.bootstrap.scss

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ $theme: $bootstrap;
6767
position: absolute;
6868
width: 100%;
6969
height: 100%;
70-
box-shadow: inset 0 0 0 rem(2px) var-get($theme, 'item-hover-color');
70+
box-shadow: inset 0 0 0 rem(2px) var-get($theme, 'item-active-hover-color');
7171
z-index: 2;
7272
}
7373
}
@@ -76,31 +76,48 @@ $theme: $bootstrap;
7676
:host([selected]) {
7777
[part='tab-header'] {
7878
position: relative;
79+
background: var-get($theme, 'item-background');
7980

8081
&::before {
81-
background: var-get($theme, 'item-active-background');
8282
box-shadow:
8383
inset 0 var(--_border-size) 0 0 var-get($theme, 'border-color'), /* Top */
8484
inset calc(var(--_border-size) * -1) 0 0 0 var-get($theme, 'border-color'), /* Left */
85-
inset var(--_border-size) 0 0 0 var-get($theme, 'border-color'), /* Right */
85+
inset var(--_border-size) 0 0 0 var-get($theme, 'border-color'); /* Right */
86+
background: var-get($theme, 'item-active-background');
87+
border-start-start-radius: var-get($theme, 'border-radius');
88+
border-start-end-radius: var-get($theme, 'border-radius');
8689
}
8790

8891
&:hover {
8992
border-top-color: var-get($theme, 'border-color');
9093
border-inline-color: var-get($theme, 'border-color');
9194
border-bottom-color: var-get($theme, 'item-background');
9295
background: var-get($theme, 'item-background');
96+
97+
&::before {
98+
background: var-get($theme, 'item-active-hover-background');
99+
}
93100
}
94101

95102
&:focus,
96103
&:focus-within {
97-
background: var-get($theme, 'item-active-background');
98104
border: none;
105+
background: var-get($theme, 'item-background');
106+
107+
&::after{
108+
border-top-left-radius: var-get($theme, 'border-radius');
109+
border-top-right-radius: var-get($theme, 'border-radius');
110+
border-bottom-left-radius: rem(4px);
111+
border-bottom-right-radius: rem(4px);
112+
}
99113
}
100114

101115
&:focus-within {
102116
&::before {
103117
box-shadow: none;
118+
border-bottom-left-radius: rem(4px);
119+
border-bottom-right-radius: rem(4px);
120+
background: var-get($theme, 'item-active-hover-background');
104121
}
105122
}
106123
}

src/components/tabs/themes/shared/tab/tab.common.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,19 @@ $theme: $material;
2828
:host([selected]) {
2929
[part='tab-header'] {
3030
color: var-get($theme, 'item-active-color');
31+
background: var-get($theme, 'item-active-background');
3132

3233
::slotted(igc-icon) {
3334
color: var-get($theme, 'item-active-icon-color');
3435
}
3536

3637
&:hover,
3738
&:focus-within {
38-
color: var-get($theme, 'item-active-color');
39-
background: var-get($theme, 'item-active-background');
39+
color: var-get($theme, 'item-active-hover-color');
40+
background: var-get($theme, 'item-active-hover-background');
4041

4142
::slotted(igc-icon) {
42-
color: var-get($theme, 'item-active-icon-color');
43+
color: var-get($theme, 'item-active-hover-icon-color');
4344
}
4445
}
4546
}

src/components/tabs/themes/shared/tab/tab.fluent.scss

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,4 @@ $theme: $fluent;
1616
[part='content'] {
1717
font-weight: 700;
1818
}
19-
20-
[part='tab-header'] {
21-
&:hover,
22-
&:focus-within {
23-
color: var-get($theme, 'item-hover-color');
24-
25-
::slotted(igc-icon) {
26-
color: var-get($theme, 'item-active-icon-color');
27-
}
28-
}
29-
}
3019
}

src/components/tabs/themes/shared/tab/tab.indigo.scss

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,4 @@ $theme: $indigo;
2828
@include type-style('subtitle-2');
2929

3030
text-transform: uppercase;
31-
}
32-
33-
:host([selected]) {
34-
[part='tab-header'] {
35-
&:hover,
36-
&:focus-within {
37-
background: var-get($theme, 'item-hover-background');
38-
}
39-
}
4031
}

src/components/tabs/themes/shared/tabs/tabs.indigo.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ igc-icon-button:hover::part(base) {
5757

5858
igc-icon-button::part(base) {
5959
overflow: hidden;
60+
}
61+
62+
igc-icon-button[disabled]::part(base),
63+
igc-icon-button:disabled::part(base) {
6064
border-bottom: rem(1px) solid var(--nav-btn-border-color);
6165
}
6266

0 commit comments

Comments
 (0)