Skip to content

Commit 82e22fe

Browse files
committed
feat(button): update button themes
1 parent ad4bdfa commit 82e22fe

File tree

5 files changed

+35
-3
lines changed

5 files changed

+35
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
}
158158

159159
@if not($focus-visible-foreground) and $focus-visible-background {
160-
$focus-visible-foreground: adaptive-contrast(var(--focus-visible-foreground));
160+
$focus-visible-foreground: adaptive-contrast(var(--focus-visible-background));
161161
}
162162

163163
@if not($focus-visible-border-color) and $focus-border-color {

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,22 @@
225225
from var(--focus-visible-background) h s l / 0.5
226226
);
227227
}
228+
229+
@if not($disabled-background) and $background {
230+
$disabled-background: hsla(from var(--background) h s l / 0.5);
231+
}
232+
233+
@if not($disabled-icon-color) and $disabled-foreground {
234+
$disabled-icon-color: var(--disabled-foreground);
235+
}
236+
237+
@if not($disabled-foreground) and $disabled-background {
238+
$disabled-foreground: hsla(from adaptive-contrast(var(--disabled-background)) h s l / 0.5);
239+
}
240+
241+
@if not($disabled-icon-color) and $disabled-background {
242+
$disabled-icon-color: hsla(from adaptive-contrast(var(--disabled-background)) h s l / 0.5);
243+
}
228244
}
229245

230246
@if not($resting-shadow) {

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,22 @@
219219
from var(--focus-visible-background) h s l / 0.5
220220
);
221221
}
222+
223+
@if not($disabled-background) and $background {
224+
$disabled-background: hsla(from var(--background) h s l / 0.5);
225+
}
226+
227+
@if not($disabled-icon-color) and $disabled-foreground {
228+
$disabled-icon-color: var(--disabled-foreground);
229+
}
230+
231+
@if not($disabled-foreground) and $disabled-background {
232+
$disabled-foreground: hsla(from adaptive-contrast(var(--disabled-background)) h s l / 0.5);
233+
}
234+
235+
@if not($disabled-icon-color) and $disabled-background {
236+
$disabled-icon-color: hsla(from adaptive-contrast(var(--disabled-background)) h s l / 0.5);
237+
}
222238
}
223239

224240
@if not($resting-shadow) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
}
141141

142142
@if not($focus-visible-foreground) and $focus-visible-background {
143-
$focus-visible-foreground: adaptive-contrast(var(--focus-visible-foreground));
143+
$focus-visible-foreground: adaptive-contrast(var(--focus-visible-background));
144144
}
145145

146146
@if not($focus-visible-border-color) and $focus-border-color {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
}
140140

141141
@if not($focus-visible-foreground) and $focus-visible-background {
142-
$focus-visible-foreground: adaptive-contrast(var(--focus-visible-foreground));
142+
$focus-visible-foreground: adaptive-contrast(var(--focus-visible-background));
143143
}
144144

145145
@if not($focus-visible-border-color) and $focus-border-color {

0 commit comments

Comments
 (0)