Skip to content

Commit 6900e80

Browse files
committed
fix(aria/combobox): separates placeholder prefixes
Updates Aria Autocomplete demo styles to separate the recently added ::placeholder styles to ensure styles are applied to each browser. Fixes b/477617379
1 parent af49eee commit 6900e80

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

src/components-examples/aria/autocomplete/autocomplete.css

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,28 @@
118118
font-size: 0.9rem;
119119
}
120120

121+
/* The ::placeholder selectors are intentionally separated.
122+
The 'material/no-prefixes' stylelint rule flags the standard ::placeholder
123+
when grouped with vendor prefixes. Each prefix is on its own rule to comply.
124+
Vendor prefixes are included to ensure consistent placeholder styling
125+
across different browsers. */
126+
121127
/* stylelint-disable material/no-prefixes -- Provides all prefixes for ::placeholder */
122-
input::-webkit-input-placeholder,
123-
input::-moz-placeholder, /* Firefox 19+ */
124-
input:-ms-input-placeholder, /* IE 10+ */
125-
input:-moz-placeholder, /* Firefox 18- */
128+
input::-webkit-input-placeholder {
129+
color: var(--mat-sys-on-surface-variant);
130+
}
131+
132+
input::-moz-placeholder /* Firefox 19+ */ {
133+
color: var(--mat-sys-on-surface-variant);
134+
}
135+
136+
input:-ms-input-placeholder /* IE 10+ */ {
137+
color: var(--mat-sys-on-surface-variant);
138+
}
139+
input:-moz-placeholder /* Firefox 18- */ {
140+
color: var(--mat-sys-on-surface-variant);
141+
}
142+
126143
input::placeholder {
127144
color: var(--mat-sys-on-surface-variant);
128145
}

0 commit comments

Comments
 (0)