W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2010

[whatwg] Customize HTML5 forms placeholder style

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 18 Feb 2010 16:56:49 -0600
Message-ID: <dd0fbad1002181456l7f901adet8cf587c4910572f3@mail.gmail.com>
On Thu, Feb 18, 2010 at 4:54 PM, L. David Baron <dbaron at dbaron.org> wrote:
> On Thursday 2010-02-18 16:45 -0600, Tab Atkins Jr. wrote:
>> Anne suggested in IRC using the pseudoclass approach, and pairing it
>> with the ::value pseudoelem from the Basic UI Module. ?You could get
>
> But the key question (from the Webkit bug) is really whether the UA
> styles apply to the input itself or a pseudo-element inside of it.
>
> If the UA style is
> ?input:has-placeholder { color: ... }
> then, as far as I can tell, there's no point to styling the ::value.
>
> If the UA style is
> ?input:has-placeholder::value { color: ... }
> then you get the same cascading result as with an input::placeholder
> pseudo-element (styles that don't select the pseudo-element don't
> change the UA default), but with the addition that authors can style
> the input in other ways.

I agree, that is the key question.  This approach is just somewhat
consistent with an existing CSS module and would allow authors some
relatively larger power.  We'd still have to decide which behavior is
best and set up the UA style appropriately.

~TJ
Received on Thursday, 18 February 2010 14:56:49 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:21 UTC