Skip to content

Commit 9195d39

Browse files
committed
fix(theme): some component themes don't work with fluent dark
1 parent 44359ca commit 9195d39

File tree

4 files changed

+36
-28
lines changed

4 files changed

+36
-28
lines changed

projects/igniteui-angular/src/lib/core/styles/components/button-group/_button-group-theme.scss

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -149,24 +149,17 @@
149149
$group-item-min-width: 24px;
150150
$group-item-border-thickness: 1px;
151151
$group-items-margin: rem(10px, 16px);
152+
$transition: all 140ms $ease-in-out-quad;
152153

153154
%igx-group-display {
154155
display: flex;
155156
box-shadow: --var($theme, 'shadow');
156-
transition: all 140ms $ease-in-out-quad;
157+
transition: $transition;
157158
border-radius: --var($theme, 'border-radius')
158159
}
159160

160161
%igx-group-item {
161-
&%igx-button--flat {
162-
border-radius: 0;
163-
}
164-
165-
%igx-icon-display {
166-
color: currentColor;
167-
transition: all 140ms $ease-in-out-quad;
168-
}
169-
162+
@include ellipsis();
170163
border: $group-item-border-thickness solid --var($theme, 'item-border-color');
171164
color: --var($theme, 'item-text-color');
172165
background: --var($theme, 'item-background');
@@ -180,16 +173,20 @@
180173
user-select: none;
181174
position: relative;
182175
z-index: 0;
183-
transition: all 140ms $ease-in-out-quad;
176+
transition: $transition;
184177

185-
@include ellipsis();
178+
&%igx-button--flat {
179+
border-radius: 0;
180+
}
181+
182+
%igx-icon-display {
183+
color: currentColor;
184+
}
186185

187186
&:not(:nth-child(0)) {
188187
margin-left: -1px;
189188
}
190189

191-
192-
193190
&:first-of-type {
194191
border-radius: --var($theme, 'border-radius') 0 0 --var($theme, 'border-radius');
195192
}

projects/igniteui-angular/src/lib/core/styles/components/input/_input-group-theme.scss

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -658,18 +658,16 @@
658658
border-color: --var($theme, 'success-secondary-color');
659659
}
660660

661-
%fluent-input-disabled {
662-
// TODO: this should be a variable
663-
color: rgb(161, 159, 157)
664-
}
665-
666661
%fluent-input {
667662
padding: 0;
668663
margin: 0;
669-
// TODO: this should be a variable
670664
border: none;
671665
}
672666

667+
%fluent-input-disabled {
668+
color: --var($theme, 'disabled-text-color');
669+
}
670+
673671
%form-group-bundle-main--fluent {
674672
padding-left: rem(8px);
675673
}
@@ -691,7 +689,7 @@
691689
transform-origin: top left;
692690
margin-top: 0 !important;
693691
height: auto;
694-
color: rgb(50, 49, 48);
692+
color: igx-color(map-get($theme, 'palette'), 'grays', 800);
695693

696694
[dir='rtl'] & {
697695
transform-origin: top right;
@@ -707,15 +705,15 @@
707705
}
708706

709707
%fluent-label-disabled {
710-
color: rgb(161, 159, 157);
708+
color: igx-color(map-get($theme, 'palette'), 'grays', 500);
711709
}
712710

713711
%fluent-label-filled {
714712
transform: translateY(0);
715713
}
716714

717715
%fluent-label-focused {
718-
color: #333;
716+
color: igx-color(map-get($theme, 'palette'), 'grays', 800);
719717
transform: translateY(0) scale(1);
720718
}
721719

projects/igniteui-angular/src/lib/core/styles/components/switch/_switch-theme.scss

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,21 @@
175175
fluent: none
176176
), map-get($theme, variant));
177177

178+
$thumb-resting-shadow: map-get((
179+
material: --var($theme, 'resting-shadow'),
180+
fluent: none
181+
), map-get($theme, variant));
182+
183+
$thumb-hover-shadow: map-get((
184+
material: --var($theme, 'hover-shadow'),
185+
fluent: none
186+
), map-get($theme, variant));
187+
188+
$thumb-disabled-shadow: map-get((
189+
material: --var($theme, 'disabled-shadow'),
190+
fluent: none
191+
), map-get($theme, variant));
192+
178193
$switch-thumb-height: $switch-thumb-width ;
179194

180195
$ripple-size: em(48px);
@@ -246,12 +261,12 @@
246261
min-width: rem($switch-thumb-width);
247262
border-radius: --var($theme, 'border-radius-thumb');
248263
background: --var($theme, 'thumb-off-color');
249-
box-shadow: --var($theme, 'resting-shadow');
264+
box-shadow: $thumb-resting-shadow;
250265
transition: $input-transition;
251266
transform: translateX(rem($switch-off-offset));
252267

253268
&:hover {
254-
box-shadow: --var($theme, 'hover-shadow');
269+
box-shadow: $thumb-hover-shadow;
255270
}
256271
}
257272

@@ -266,7 +281,7 @@
266281

267282
%switch-composite-thumb--disabled {
268283
background: --var($theme, 'thumb-disabled-color');
269-
box-shadow: --var($theme, 'disabled-shadow');
284+
box-shadow: $thumb-disabled-shadow;
270285
}
271286

272287
%switch-ripple {

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@
5757
/// @requires {map} $_default-shape-input-group
5858
/// @requires {map} $_default-elevation-input-group
5959
/// @see $default-palette
60-
61-
6260
$_light-input-group: extend(
6361
$_default-shape-input-group,
6462
$_default-elevation-input-group,

0 commit comments

Comments
 (0)