Skip to content

Commit d3fffde

Browse files
committed
feat(input-group): update disabled states
1 parent 66326b9 commit d3fffde

File tree

1 file changed

+38
-12
lines changed

1 file changed

+38
-12
lines changed

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

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -156,18 +156,6 @@
156156
$box-background-focus: hsl(from var(--box-background) h s calc(l * 0.9));
157157
}
158158

159-
@if not($box-disabled-background) and $box-background {
160-
$box-disabled-background: hsla(from var(--box-background) h s l / 0.4);
161-
}
162-
163-
@if not($disabled-placeholder-color) and $box-disabled-background {
164-
$disabled-placeholder-color: adaptive-contrast(var(--box-disabled-background));
165-
}
166-
167-
@if not($disabled-text-color) and $box-disabled-background {
168-
$disabled-text-color: adaptive-contrast(var(--box-disabled-background));
169-
}
170-
171159
@if not($placeholder-color) and $box-background {
172160
$placeholder-color: hsla(from adaptive-contrast(var(--box-background)) h s l / 0.9);
173161
}
@@ -219,6 +207,32 @@
219207
@if not($input-suffix-color--focused) and $box-background-focus {
220208
$input-suffix-color--focused: adaptive-contrast(var(--box-background-focus));
221209
}
210+
211+
@if $box-background != transparent {
212+
@if not($box-disabled-background) and $box-background {
213+
$box-disabled-background: hsla(from var(--box-background) h s l / 0.4);
214+
}
215+
216+
@if not($disabled-placeholder-color) and $box-disabled-background {
217+
$disabled-placeholder-color: adaptive-contrast(var(--box-disabled-background));
218+
}
219+
220+
@if not($disabled-text-color) and $box-disabled-background {
221+
$disabled-text-color: adaptive-contrast(var(--box-disabled-background));
222+
}
223+
} @else {
224+
@if not($box-disabled-background) and $box-background {
225+
$box-disabled-background: var(--box-background);
226+
}
227+
228+
@if not($disabled-placeholder-color) and $placeholder-color {
229+
$disabled-placeholder-color: hsla(from var(--placeholder-color) h s l / 0.7);
230+
}
231+
232+
@if not($disabled-text-color) and $idle-text-color {
233+
$disabled-text-color: hsla(from var(--idle-text-color) h s l / 0.7);
234+
}
235+
}
222236
}
223237

224238
@if $variant == 'fluent' or $variant == 'bootstrap' {
@@ -356,6 +370,18 @@
356370
@if not($disabled-text-color) and $search-disabled-background {
357371
$disabled-text-color: adaptive-contrast(var(--search-disabled-background));
358372
}
373+
} @else {
374+
@if not($search-disabled-background) and $search-background {
375+
$search-disabled-background: var(--search-background);
376+
}
377+
378+
@if not($disabled-placeholder-color) and $placeholder-color {
379+
$disabled-placeholder-color: hsla(from var(--placeholder-color) h s l / 0.7);
380+
}
381+
382+
@if not($disabled-text-color) and $idle-text-color {
383+
$disabled-text-color: hsla(from var(--idle-text-color) h s l / 0.7);
384+
}
359385
}
360386

361387
@if not($search-resting-shadow) {

0 commit comments

Comments
 (0)