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 13:58:26 -0600
Message-ID: <dd0fbad1002181158x2e25bec3yd2956e5cf05aeb93@mail.gmail.com>
On Thu, Feb 18, 2010 at 10:29 AM, Mounir Lamouri
<mounir.lamouri at gmail.com> wrote:
> Hi,
> I am working on placeholder implementation on Gecko and I am face of the
> placeholder style customization. Indeed, a website can style the
> input/textearea element which can make default placeholder style
> inappropriate.
> The trivial idea is to create a CSS pseudo-element to style the
> placeholder. I am going to implement that [1] as Webkit did [2].
> But the properties that will apply to the pseudo-element should be
> limited. Probably only those related to the font.
> At the moment, it looks like there is no specification about the style
> customization of the placeholder. Maybe it would be appropriate to
> specify one ?
> [1] https://bugzilla.mozilla.org/show_bug.cgi?id=457801
> [2] https://bugs.webkit.org/show_bug.cgi?id=21227

I agree that having a pseudoelement for the placeholder text is a good
idea.  Perhaps you could bring it up on the www-style list so we can
decide precisely what properties should apply to it?  It seems
reasonable to apply the same restrictions that we currently put on
::first-line (http://www.w3.org/TR/CSS2/selector.html#first-line-pseudo,
last paragraph of the section).

Received on Thursday, 18 February 2010 11:58:26 UTC

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