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

Re: Styling HTML placeholder attribute

From: Brad Kemper <brad.kemper@gmail.com>
Date: Thu, 24 Jan 2013 13:24:18 -0800
Message-Id: <03AFD8CA-679A-4300-AD9A-819ED27108FD@gmail.com>
Cc: Bjoern Hoehrmann <derhoermi@gmx.net>, Philip Walton <philip@philipwalton.com>, www-style list <www-style@w3.org>
To: Alan Stearns <stearns@adobe.com>
On Jan 24, 2013, at 1:07 PM, Alan Stearns <stearns@adobe.com> wrote:

> On 1/24/13 12:41 PM, "Bjoern Hoehrmann" <derhoermi@gmx.net> wrote:
>> * Philip Walton wrote:
>>> Obviously it would be terribly confusing, but has the option of both
>>> pseudo-class and pseudo-element been discussed?
>>> `input:placeholder` would be used to describe an input element whose
>>> placeholder is visible and `input::placeholder` would be used to style
>>> the
>>> placeholder.
>> I note in passing that the identifier `placeholder` does not have to be
>> used in any selector at all, the Working Group is free to call them e.g.
>> `:unedited` and `::hint-text` if it wanted to.
> This seems the most reasonable approach to me (based on what I've
> understood in this thread so far).
> Have an :unedited pseudo-class representing the state of the input
> element, with a ::suggestion pseudo-element that represents the contents
> of the element in that state. I'll add this option to the wiki. 

I agree that this would be terribly confusing. I guess it would allow using opacity and also styling the borders differently based on state, but it would be rough for authors to have to remember that it is two colons for color and opacity and one colon for everything else. Put a background or border on the wrong one and you get very bad results. 
Received on Thursday, 24 January 2013 21:24:52 UTC

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