Skip to content

Commit 63ac8d6

Browse files
committed
fix(input): material search type readonly state
1 parent 612ee59 commit 63ac8d6

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/components/input/themes/shared/input.material.scss

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ input:placeholder-shown + [part='notch'] [part='label'],
212212
}
213213
}
214214

215-
:host(:not([outlined],[aria-haspopup='dialog'],[role='combobox'])[readonly]:hover) {
215+
:host(:not([outlined],[type='search'],[aria-haspopup='dialog'],[role='combobox'])[readonly]:hover) {
216216
[part~='container'] {
217217
background: var-get($theme, 'box-background-focus');
218218
border-bottom-color: var-get($theme, 'idle-bottom-line-color');
@@ -299,6 +299,13 @@ input:placeholder-shown + [part='notch'] [part='label'],
299299
}
300300
}
301301

302+
:host([readonly][type='search']:hover),
303+
:host([readonly][type='search']:focus-within) {
304+
[part^='container'] {
305+
background: var-get($theme, 'search-background');
306+
}
307+
}
308+
302309
:host([outlined][type='search']) {
303310
[part~='labelled'] [part~='input'] {
304311
padding-top: rem(20px);
@@ -408,6 +415,10 @@ input:placeholder-shown + [part='notch'] [part='label'],
408415
[part='filler'] {
409416
border-color: var-get($theme, 'border-color');
410417
}
418+
419+
[part~='filled'] + [part='notch'] {
420+
@extend %floated-styles;
421+
}
411422
}
412423

413424
:host(:not([aria-haspopup='dialog'],[role='combobox'])[outlined][readonly]:focus-within) {
@@ -417,6 +428,10 @@ input:placeholder-shown + [part='notch'] [part='label'],
417428
[part='filler'] {
418429
border-color: var-get($theme, 'focused-border-color');
419430
}
431+
432+
[part='notch'] {
433+
border-top: $idle-border-width solid transparent;
434+
}
420435
}
421436

422437
:host(:not([type='search'])[readonly][outlined]:focus-within) {

0 commit comments

Comments
 (0)