mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(form-field): native select options blending in with dropdown background on a dark theme (#13201)
This commit is contained in:
committed by
Joey Perrott
parent
675aa66b6f
commit
3f1e96023e
@@ -26,6 +26,21 @@
|
||||
@include input-placeholder {
|
||||
color: _mat-control-placeholder-color($theme);
|
||||
}
|
||||
|
||||
// On dark themes we set the native `select` color to some shade of white,
|
||||
// however the color propagates to all of the `option` elements, which are
|
||||
// always on a white background inside the dropdown, causing them to blend in.
|
||||
// Since we can't change background of the dropdown, we need to explicitly
|
||||
// reset the color of the options to something dark.
|
||||
@if (map-get($theme, is-dark)) {
|
||||
option {
|
||||
color: $dark-primary-text;
|
||||
}
|
||||
|
||||
option:disabled {
|
||||
color: $dark-disabled-text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mat-accent .mat-input-element {
|
||||
|
||||
Reference in New Issue
Block a user