Skip to content

Commit 9abf1af

Browse files
author
MPopov
committed
feat(bootstrap-theme tabs): Fix colors
1. Make tabs to use the surface color 2. Rollback the ripple
1 parent 46d2917 commit 9abf1af

File tree

4 files changed

+31
-22
lines changed

4 files changed

+31
-22
lines changed

projects/igniteui-angular/src/lib/core/styles/components/ripple/_ripple-theme.scss

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,8 @@
4848
@mixin igx-ripple($theme, $palette: $default-palette) {
4949
@include igx-root-css-vars($theme);
5050

51-
$variant: map-get($theme, variant);
52-
53-
$ripple-display: map-get((
54-
material: block,
55-
fluent: none !important,
56-
bootstrap: none !important
57-
), $variant);
58-
5951
%igx-ripple-display {
60-
display: $ripple-display;
52+
display: block;
6153
position: absolute;
6254
border-radius: 50%;
6355
background: --var($theme, 'color');

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,10 @@
375375
background: --var($theme, 'item-active-background');
376376
position: relative;
377377
z-index: 1;
378-
border-color: --var($theme, 'border-color') --var($theme, 'border-color') --var($theme, 'item-active-background');
378+
border-top-color: --var($theme, 'border-color');
379+
border-left-color: --var($theme, 'border-color');
380+
border-right-color: --var($theme, 'border-color');
381+
border-bottom-color: transparent;
379382

380383
&::after {
381384
content: '';
@@ -389,7 +392,10 @@
389392

390393
&:hover,
391394
&:focus {
392-
border-color: --var($theme, 'border-color') --var($theme, 'border-color') transparent;
395+
border-top-color: --var($theme, 'border-color');
396+
border-left-color: --var($theme, 'border-color');
397+
border-right-color: --var($theme, 'border-color');
398+
border-bottom-color: transparent;
393399
}
394400
}
395401
}

projects/igniteui-angular/src/lib/core/styles/themes/schemas/dark/_tabs.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,10 @@ $_dark-fluent-tabs: extend($_fluent-tabs, $_base-dark-tabs);
3030

3131
/// Generates a dark bootstrap tabs schema based on a mix of $_bootstrap-tabs and $_base-dark-tabs.
3232
/// @type {Map}
33+
/// @prop {Map} item-background [igx-color: ('primary', 400)] - The background color used for the tabs header.
3334
/// @requires {function} extend
3435
/// @requires $_bootstrap-tabs
3536
$_dark-bootstrap-tabs: extend($_bootstrap-tabs, (
36-
item-background: #333,
37-
button-background: #333,
38-
item-hover-background: #333,
39-
item-active-background: #333,
4037
item-hover-color: (
4138
igx-color: ('primary', 400)
4239
),

projects/igniteui-angular/src/lib/core/styles/themes/schemas/light/_tabs.scss

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/// @type {Map}
1111
///
1212
/// @property {map} item-text-color [igx-color: ('grays', 700)] - The color used for the tab text color.
13-
/// @property {map} item-background [#fff] - The background color used for the tabs header.
13+
/// @property {Color} item-background [#fff] - The background color used for the tabs header.
1414
/// @property {map} item-hover-background [igx-color: ('grays', 200)] - The background used for the tabs on hover.
1515
/// @property {map} item-hover-color [igx-color: ('grays', 700)] - The text color used for the tabs on hover.
1616
///
@@ -108,12 +108,14 @@ $_fluent-tabs: extend($_light-tabs, $_fluent-shape-tabs);
108108
/// Generates a bootstrap tabs schema.
109109
/// @type {Map}
110110
/// @property {map} item-text-color [igx-color: ('primary', 500)] - The color used for the tab text color.
111-
/// @property {Color} item-hover-background [#fff] - The background used for the tabs on hover.
112111
/// @property {map} item-hover-color [igx-color: ('primary', 700)] - The text color used for the tabs on hover.
113112
/// @property {map} item-active-color [igx-color: ('grays', 800)] - The color used for the active tabs text.
114113
/// @property {map} item-active-icon-color [igx-color: ('grays', 800)] - The color used for the active tabs icon.
115-
/// @property {Color} item-active-background [#fff] - The color used for the active/focused tab background.
116114
/// @property {map} indicator-color [igx-color: ('grays', 400)] - The color used for the tabs borders.
115+
/// @property {map} item-background [igx-color: ('surface')] - The background color used for the tabs header.
116+
/// @property {map} button-background [igx-color: ('surface')] - The color used for the button background.
117+
/// @property {map} item-hover-background [igx-color: ('surface')] - The background used for the tabs on hover.
118+
/// @property {map} item-active-background [igx-color: ('surface')] - The color used for the active/focused tab background.
117119

118120
/// @property {Number} border-radius [4px] - The border radius fraction, between 0-1 to be used for list component.
119121
/// @requires {function} extend
@@ -124,6 +126,22 @@ $_bootstrap-tabs: extend(
124126
(
125127
variant: 'bootstrap',
126128

129+
item-background: (
130+
igx-color: ('surface')
131+
),
132+
133+
button-background: (
134+
igx-color: ('surface')
135+
),
136+
137+
item-hover-background: (
138+
igx-color: ('surface')
139+
),
140+
141+
item-active-background: (
142+
igx-color: ('surface')
143+
),
144+
127145
border-color: (
128146
igx-color: ('grays', 300)
129147
),
@@ -136,8 +154,6 @@ $_bootstrap-tabs: extend(
136154
igx-color: ('primary', 500)
137155
),
138156

139-
item-hover-background: #fff,
140-
141157
item-hover-color: (
142158
igx-color: ('primary', 700)
143159
),
@@ -150,8 +166,6 @@ $_bootstrap-tabs: extend(
150166
igx-color: ('grays', 800)
151167
),
152168

153-
item-active-background: #fff,
154-
155169
indicator-color: (
156170
igx-color: ('grays', 400)
157171
),

0 commit comments

Comments
 (0)