Skip to content

Commit ab44d50

Browse files
crisbetovivian-hu-zz
authored andcommitted
fix(form-field): blue box inside focused native select on IE (#13187)
Resets the blue box that the user agent draws inside focused `select` elements in IE11.
1 parent 238aef0 commit ab44d50

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/lib/input/input.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,16 @@ select.mat-input-element {
152152
&::-moz-focus-inner {
153153
border: 0;
154154
}
155+
156+
// As a part of its user agent styling, IE11 has a blue box inside each focused
157+
// `select` element which we have to reset. Note that this needs to be in its own
158+
// selector, because having it together with another one will cause other browsers
159+
// to ignore it.
160+
&::-ms-value {
161+
// We need to reset the `color` as well, because IE sets it to white.
162+
color: inherit;
163+
background: none;
164+
}
155165
}
156166

157167
.mat-form-field-type-mat-native-select {

0 commit comments

Comments
 (0)