- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 23 Feb 2012 15:28:06 -0800
- To: Brad Kemper <brad.kemper@gmail.com>
- Cc: Simon Sapin <simon.sapin@kozea.fr>, "www-style@w3.org" <www-style@w3.org>
On Tue, Feb 21, 2012 at 8:20 AM, Brad Kemper <brad.kemper@gmail.com> wrote: > On Feb 21, 2012, at 1:02 AM, Simon Sapin <simon.sapin@kozea.fr> wrote: >> I think that selectors3 do not allow selecting descendants of :first-line >> (Pseudo-elements are only allowed at the end of a selector.) > > Doh. I always forget that weird restriction. > >> Is that in selectors4? > > Don't know. I hope the restriction gets removed. I don't understand why it > needs to be limited that way. If I can set a separate color to the first > line of a span of text, why can't I also set a separate color to a the part > of an inner span within the first line? Because the well-behaved pseudo-elements are leaf nodes, while ::first-line either has descendants (and thus the box-tree is no longer a tree, as elements have two parents), or is broken up and nested tightly inside of elements (in which case it's a leaf node). Depending on how Web Components handle selectors, we may eventually have well-behaved non-leaf pseudo-elements, but they don't exist yet. ~TJ
Received on Thursday, 23 February 2012 23:28:53 UTC