Re: Styling HTML placeholder attribute

On Jan 23, 2013, at 11:59 AM, Sylvain Galineau <sylvaing@microsoft.com> wrote:

> how do we set display:none 
> on this pseudo-element at the right time? Or, conversely, when do we set 
> display:inline-block and the other styling it needs when it ought to be 
> visible? :focus is clearly not the answer.
> [...]
> 
> But even if we do not expose this state in CSS, interoperable agreement 
> on when this content is/isn't visible would be best.

It seems like this may be more of a platform issue. As I mentioned earlier, MacOS (not just Safari) used to hide the placeholder as soon as the field was focused. But iOS didn't, and now neither does MacOS. So the convention is different between different versions of the OS, and used to be different between the mobile and non-mobile versions of OS X. 

By the way, :disabled is another situation where an author may want to change the text color alpha without changing 'opacity' on the entire element. And that is clearly not a pseudo-element. 

Received on Thursday, 24 January 2013 06:48:45 UTC