Skip to content

Commit 17349b3

Browse files
committed
fix(tabs): adress comments + additional theme parameter changes
1 parent a04953d commit 17349b3

File tree

8 files changed

+47
-9
lines changed

8 files changed

+47
-9
lines changed

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

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,24 @@ $theme: $bootstrap;
3131
}
3232

3333
[part='tab-header'] {
34+
border: none;
35+
3436
&:hover {
37+
border: none;
38+
background: var-get($theme, 'item-background');;
39+
3540
&::before {
3641
box-shadow:
3742
inset 0 var(--_border-size) 0 0 var-get($theme, 'border-color--hover'), /* Top */
3843
inset calc(var(--_border-size) * -1) 0 0 0 var-get($theme, 'border-color--hover'), /* Left */
39-
inset var(--_border-size) 0 0 0 var-get($theme, 'border-color--hover'), /* Right */
44+
inset var(--_border-size) 0 0 0 var-get($theme, 'border-color--hover'); /* Right */
45+
background: var-get($theme, 'item-hover-background');
46+
}
47+
48+
&:hover:focus-within {
49+
&::before {
50+
box-shadow: none;
51+
}
4052
}
4153
}
4254

@@ -55,7 +67,6 @@ $theme: $bootstrap;
5567
width: 100%;
5668
height: 100%;
5769
box-shadow: inset 0 0 0 rem(2px) var-get($theme, 'item-hover-color');
58-
border-radius: var-get($theme, 'border-radius');
5970
z-index: 2;
6071
}
6172
}
@@ -64,9 +75,9 @@ $theme: $bootstrap;
6475
:host([selected]) {
6576
[part='tab-header'] {
6677
position: relative;
67-
background: var-get($theme, 'item-active-background');
6878

6979
&::before {
80+
background: var-get($theme, 'item-active-background');
7081
box-shadow:
7182
inset 0 var(--_border-size) 0 0 var-get($theme, 'border-color'), /* Top */
7283
inset calc(var(--_border-size) * -1) 0 0 0 var-get($theme, 'border-color'), /* Left */
@@ -77,12 +88,19 @@ $theme: $bootstrap;
7788
border-top-color: var-get($theme, 'border-color');
7889
border-inline-color: var-get($theme, 'border-color');
7990
border-bottom-color: var-get($theme, 'item-background');
91+
background: var-get($theme, 'item-background');
8092
}
8193

8294
&:focus,
83-
&:focus-within
84-
{
95+
&:focus-within {
8596
background: var-get($theme, 'item-active-background');
97+
border: none;
98+
}
99+
100+
&:focus-within {
101+
&::before {
102+
box-shadow: none;
103+
}
86104
}
87105
}
88106
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ $theme: $material;
77
color: var-get($theme, 'item-text-color');
88
background: var-get($theme, 'item-background');
99
border-radius: var-get($theme, 'border-radius');
10+
border: rem(1px) solid var-get($theme, 'border-color');
1011

1112
::slotted(igc-icon) {
1213
color: var-get($theme, 'item-icon-color');
@@ -16,6 +17,7 @@ $theme: $material;
1617
&:focus-within {
1718
color: var-get($theme, 'item-hover-color');
1819
background: var-get($theme, 'item-hover-background');
20+
border: rem(1px) solid var-get($theme, 'border-color--hover');
1921

2022
::slotted(igc-icon) {
2123
color: var-get($theme, 'item-hover-icon-color');

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ $theme: $indigo;
1313

1414
[part='tab-header'] {
1515
padding: pad-block(rem(12px)) pad-inline(rem(16px));
16+
border-top: rem(1px) solid transparent;
17+
border-inline: none;
18+
19+
&:hover,
20+
&:focus-within {
21+
border-top: rem(1px) solid transparent;
22+
border-inline: none;
23+
border-bottom: rem(1px) solid var-get($theme, 'border-color--hover');
24+
}
1625
}
1726

1827
[part='content'] {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ $theme: $bootstrap;
77
--header-min-height: #{rem(48px)};
88
}
99

10+
[part~=inner] {
11+
flex-grow: 1;
12+
}
13+
1014
:host([alignment='start']) {
1115
[part~='inner']:not([part~='scrollable']) {
1216
&::after {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $theme: $material;
1515
--active-background: #{var-get($theme, 'button-hover-background')};
1616
--border-color: #{var-get($theme, 'button-background')};
1717
--disabled-foreground: #{var-get($theme, 'button-disabled-color')};
18-
--disabled-background: #{var-get($theme, 'item-background')};
18+
--disabled-background: #{var-get($theme, 'button-background')};
1919

2020
[part~='base'] {
2121
transition: all 0ms;

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ $theme: $indigo;
88
:host {
99
--header-min-height: #{rem(40px)};
1010
--scroll-btn-size: #{rem(40px)};
11+
--nav-btn-border-color: #{var-get($theme, 'border-color')};
1112
}
1213

1314
[part='selected-indicator'] {
@@ -27,7 +28,6 @@ $theme: $indigo;
2728
position: absolute;
2829
width: 100%;
2930
height: $indicator-height;
30-
background-color: var-get($theme, 'border-color');
3131
inset-block-end: 100%;
3232
}
3333
}
@@ -45,17 +45,19 @@ $theme: $indigo;
4545
}
4646

4747
igc-icon-button:hover::part(base) {
48+
background-color: var-get($theme, 'button-hover-background');
49+
4850
&::after {
4951
content: '';
5052
position: absolute;
5153
inset: 0;
52-
background-color: var-get($theme, 'button-hover-background');
5354
z-index: 1;
5455
}
5556
}
5657

5758
igc-icon-button::part(base) {
5859
overflow: hidden;
60+
border-bottom: rem(1px) solid var(--nav-btn-border-color);
5961
}
6062

6163
igc-icon-button::part(icon) {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ $theme: $material;
1818
background: var-get($theme, 'indicator-color');
1919
}
2020
}
21+
22+
igc-icon-button:hover::part(icon) {
23+
color: var(--hover-foreground);
24+
}

src/components/tabs/themes/tabs.base.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
grid-template-rows: minmax(var(--header-min-height), auto) auto 1fr;
4444
align-items: center;
4545
position: relative;
46-
flex-grow: 1;
4746

4847
::slotted(igc-tab) {
4948
display: contents;

0 commit comments

Comments
 (0)