Skip to content

Commit d4f255c

Browse files
committed
feat(tabs): update tabs theme
1 parent d3fffde commit d4f255c

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

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

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@
8080
$theme: digest-schema($tabs-schema);
8181
$variant: map.get($theme, '_meta', 'theme');
8282

83-
@if not($item-hover-background) and $item-background {
84-
$item-hover-background: hsl(from var(--item-background) h s calc(l * 0.9));
85-
}
86-
8783
@if not($item-active-background) and $item-background {
8884
$item-active-background: hsl(from var(--item-background) h s calc(l * 0.9));
8985
}
@@ -98,11 +94,11 @@
9894
}
9995
} @else {
10096
@if not($item-text-color) and $item-background {
101-
$item-text-color: hsla(from adaptive-contrast(var(--item-background)) h s l / 0.9);
97+
$item-text-color: hsla(from adaptive-contrast(var(--item-background)) h s l / 0.8);
10298
}
10399

104100
@if not($item-icon-color) and $item-background {
105-
$item-icon-color: hsla(from adaptive-contrast(var(--item-background) h s l / 0.9));
101+
$item-icon-color: hsla(from adaptive-contrast(var(--item-background) h s l / 0.8));
106102
}
107103
}
108104

@@ -134,15 +130,29 @@
134130
}
135131
}
136132

137-
@if $variant == 'bootstrap' {
133+
@if not($item-hover-background) {
138134
@if not($item-hover-color) and $item-text-color {
139-
$item-hover-color: hsl(from var(--item-text-color) h s calc(l * 0.9));
135+
$item-hover-color: hsla(from var(--item-text-color) h s l / 1);
140136
}
141137

142138
@if not($item-hover-icon-color) and $item-icon-color {
143-
$item-hover-icon-color: hsla(from var(--item-icon-color) h s calc(l * 0.9));
139+
$item-hover-icon-color: hsla(from var(--item-icon-color) h s l / 1);
144140
}
141+
} @else {
142+
@if not($item-hover-color) {
143+
$item-hover-color: adaptive-contrast(var(--item-hover-background));
144+
}
145+
146+
@if not($item-hover-icon-color) {
147+
$item-hover-icon-color: adaptive-contrast(var(--item-hover-background));
148+
}
149+
}
150+
151+
@if not($item-hover-background) and $item-background {
152+
$item-hover-background: hsl(from var(--item-background) h s calc(l * 0.9));
153+
}
145154

155+
@if $variant == 'bootstrap' {
146156
@if not($border-color) and $item-background {
147157
$border-color: hsla(from adaptive-contrast(var(--item-background)) h s l / 0.5);
148158
}
@@ -151,14 +161,6 @@
151161
$border-color--hover: var(--border-color);
152162
}
153163
} @else {
154-
@if not($item-hover-color) and $item-text-color {
155-
$item-hover-color: hsla(from var(--item-text-color) h s l / 1);
156-
}
157-
158-
@if not($item-hover-icon-color) and $item-icon-color {
159-
$item-hover-icon-color: hsla(from var(--item-icon-color) h s l / 1);
160-
}
161-
162164
@if not($item-background) {
163165
@if not($indicator-color) and $item-text-color {
164166
$indicator-color: var(--item-text-color);
@@ -172,7 +174,6 @@
172174
$indicator-color: var(--item-active-color);
173175
}
174176

175-
176177
@if not($indicator-color) {
177178
$indicator-color: adaptive-contrast(var(--item-background));
178179
}

0 commit comments

Comments
 (0)