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

Re: Overloading pseudo-elements seems bad

From: Anne van Kesteren <annevk@opera.com>
Date: Sat, 13 Aug 2011 12:30:02 +0200
To: "David Hyatt" <hyatt@apple.com>, "Boris Zbarsky" <bzbarsky@mit.edu>, "Dimitri Glazkov" <dglazkov@google.com>
Cc: "www-style@w3.org" <www-style@w3.org>, "Tab Atkins" <tabatkins@google.com>
Message-ID: <op.vz5d4czh64w2qv@annevk-macbookpro.local>
On Thu, 11 Aug 2011 04:30:12 +0200, Dimitri Glazkov <dglazkov@google.com>  
> Tab just pointed out to me that another issue with using
> pseudo-elements is if we let developers just create their own, CSS3
> won't be able to add new pseudo-elements, paralyzed by fear of
> breaking the Web. The solutions are:
> 1) Only allow developers to use a strict set of names (which seems
> deficient, because we can't really invent all names for all purposes
> here)
> 2) Use some sort of a prefix
> 3) Invent a different method of conveying this information, like
> part(foo) that I suggested before.
> 4) <insert idea>

I think ::part(ident) or ::shadow(ident) is the best. That way parsing  
rules do not have to be changed (unknown pseudo-elements are dropped,  
currently violated by WebKit) and the purpose of the pseudo-elements when  
used in a style sheet is clear.

Alternatively we could have a new combinator for reaching into a shadow  
DOM of an element.

Either way the shadow DOM will need to clearly indicate which elements can  
be selected.

Anne van Kesteren
Received on Saturday, 13 August 2011 10:30:38 UTC

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