W3C home > Mailing lists > Public > www-style@w3.org > January 2013

Re: Styling HTML placeholder attribute

From: Brad Kemper <brad.kemper@gmail.com>
Date: Wed, 23 Jan 2013 22:48:13 -0800
Message-Id: <616F3980-4FE0-4738-84BF-374B48030F6A@gmail.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Mounir Lamouri <mounir@lamouri.fr>, www-style list <www-style@w3.org>
To: Sylvain Galineau <sylvaing@microsoft.com>
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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:25 UTC