Why does CSS text color override placeholder color in IE 10?

Why is the parameter colorfor -ms-input-placeholderoverridden by the color setting for input fields? ( input[type=text],input[type=password], textarea, select)

In Chrome and Firefox, this works great.

See image with blue placeholder text, even if -ms-input-placeholderset to red.

IE 10 Dev Tools

+4
source share
1 answer

Most likely, your selector input[type=text]appears after your selector input:-ms-input-placeholderin your stylesheet, which leads to the fact that it takes precedence (since both selectors are equally specific). In this case, you will want to move the placeholder rule below so that this takes precedence.

, Chrome Firefox, , , , , .

+7

Source: https://habr.com/ru/post/1545709/


All Articles