Normalize.css: Correct the text style of placeholders in IE

Created on 13 Apr 2016  路  10Comments  路  Source: necolas/normalize.css

Not sure you get my comments on #571:

At least, if you are not convinced by my comment, you need to set the placeholder color for IE, as it doesn't use the text color by default:
:-ms-input-placeholder {
color: inherit;
}

bug

Most helpful comment

Looking at the bug report at https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/3901363/, it is now marked as fixed but there is no indication of when this happened or whether this is shipped or not. Edit: trying out in a fresh Edge VM, it does not seem to be fixed _yet_.

My two cents: normalize.css seems to have opinions where they are necessary. The default might not be as good as the current value it uses, but I'd rather have to pick something else purposefully when I need to than have to deal with this bug _if I notice it_.

All 10 comments

In Edge placeholders will not show up in relative/absolute positioned inputs with an opacity < 1.

Bug report: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/3901363/
Test case: http://jsfiddle.net/wzmb7enL/

We can solve this in two ways:

  1. Remove the placeholder normalisation altogether and let browsers / frameworks handle it
  2. Set placeholder opacity to 1 (for Firefox) and use an arbitrary color

The 2nd meet my comment [https://github.com/necolas/normalize.css/issues/550#issuecomment-208262491], which seems to be the best solution:

[鈥 i still believe that we have to force the placeholder color to a light grey for the moment, and fix Firefox - the only browser which do it differently - to opacity:1!

Looking at the bug report at https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/3901363/, it is now marked as fixed but there is no indication of when this happened or whether this is shipped or not. Edit: trying out in a fresh Edge VM, it does not seem to be fixed _yet_.

My two cents: normalize.css seems to have opinions where they are necessary. The default might not be as good as the current value it uses, but I'd rather have to pick something else purposefully when I need to than have to deal with this bug _if I notice it_.

Closed via #587

Why was this issue closed? The way normalize is handling placeholders triggers a bug in Edge (see my previous comment).

I don't understand why this was closed either. #587 is about overriding default styles for consistency's sake, whereas this is about fixing a demonstrable bug with the current normalization.

@jonathantneal, could we re-open this? So we can check the report made by @slavanga. If by adding a color normalization we are breaking the placeholder feature in Edge on certain conditions, it's not a good thing.

_Edit:_ by "color" I mean color and opacity.

This may be another example where normalize.css needs to leave the normalization due to side effects. However, it would be very useful to add a note to documentation. Anyone up for a PR?

@jonathantneal, if there is no way to safely normalize this, I'll be in favour of removing this completely and ASAP.

If anyone is up for a PR go ahead, if not I'll tackle this in a couple of hours.

Looking at the bug report at https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/3901363/, it is now marked as fixed but there is no indication of when this happened or whether this is shipped or not. Edit: trying out in a fresh Edge VM, it does not seem to be fixed _yet_.

Confirmed as fixed in Edge 16.16299 via Browserstack and in latest (18.18363) on local Windows 10.

Was this page helpful?
0 / 5 - 0 ratings