W3C home > Mailing lists > Public > www-style@w3.org > October 2011

Re: [css3-ui] Proposal: CSS autofill psuedoclass

From: Sergey Ilinsky <sergey@ilinsky.com>
Date: Wed, 12 Oct 2011 16:18:42 +0200
Message-ID: <CAJNhjPavfA47gO03r7tdQbYuSWLN4o=6=WR6JJFbtUvgx-BO0w@mail.gmail.com>
To: Ilya Sherman <isherman@chromium.org>
Cc: www-style@w3.org
Should be pseudo-element (::), not pseudo-class (:). Pseudo-classes are to
select elements in certain states, pseudo-elements are to access elements'


On 12 October 2011 00:29, Ilya Sherman <isherman@chromium.org> wrote:

> Most browsers offer a feature to save and automatically fill web passwords.
>  Some of the associated rendering engines -- WebKit and Presto, for example
> -- style such autofilled fields distinctively.  WebKit, in particular, sets
> a yellow background color (and a black foreground color).
> Many web authors (source: [1], numerous StackOverflow posts) would like to
> be able to override this styling.  We propose exposing an 'autofill' or
> 'autocomplete' CSS pseudoclass to allow authors to style such fields: see
> [2].  In fact, WebKit already does so, via the "-webkit-autofill"
> pseudoclass.  This was originally meant to be an irrelevant implementation
> detail, as the only styles it added were flagged with "!important"; but
> authors are already using this pseudoclass, coupled with JavaScript, to
> override styling for such fields: [3].
> We are open to alternative suggestions, in place of using a pseudoclass.
>  However, we believe that reaching some consensus here will help make the
> web platform that much better.
> Note that we do not believe CSS styling of autofilled fields to be a
> security concern, as websites can already use JavaScript to circumvent the
> rendering agent-imposed style.
> [1] https://crbug.com/46543 <http://crbug.com/46543>
> [2] https://bugs.webkit.org/show_bug.cgi?id=66032
> [3] https://crbug.com/46543#c22
Received on Wednesday, 12 October 2011 14:19:21 UTC

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