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

Overloading pseudo-elements seems bad, was: Need a better way to reach into the shadow DOM subtree

From: Dimitri Glazkov <dglazkov@google.com>
Date: Wed, 10 Aug 2011 19:30:12 -0700
Message-ID: <CADh5Ky20Fa78KZ=t8WkPmcsgMY3hLXC3mdx9VougktdRP3y+Mw@mail.gmail.com>
To: David Hyatt <hyatt@apple.com>, Boris Zbarsky <bzbarsky@mit.edu>
Cc: "www-style@w3.org" <www-style@w3.org>, Tab Atkins <tabatkins@google.com>
Dave, Boris,

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>

:DG<

On Wed, Apr 27, 2011 at 1:33 PM, Dimitri Glazkov <dglazkov@google.com> wrote:
> As of http://trac.webkit.org/changeset/85077, the restrictions on
> pseudo-elements are relaxed and allow chaining pseudo-elements and
> pseudo-classes at will.
>
> :DG<
>
> On Mon, Apr 11, 2011 at 12:59 PM, David Hyatt <hyatt@apple.com> wrote:
>> On Apr 11, 2011, at 2:50 PM, Dimitri Glazkov wrote:
>>
>>> video::-webkit-timeline:disabled { /* ... */ }
>>>
>>> How do we fix this? Tab suggests a new combinator selector like:
>>
>> Just keep using pseudo-elements, but lift all the silly restrictions placed on them, e.g., that they have to be the rightmost selector.  The issue isn't with pseudo-elements.  The issue is with the restrictions placed on pseudo-element usage that don't need to be there.
>>
>> Note that WebKit already has its own pseudo-element extensions that deliberately violate this rule, e.g., all of the scrollbar parts, which support states like hover/active/disabled using rules just like what you've described above.
>>
>> dave
>> (hyatt@apple.com)
>>
>>
>
Received on Thursday, 11 August 2011 02:30:57 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:43 GMT