Re: CSS3 Selectors question

On Thu, 1 May 2003, Michael Day wrote:
>
> p::before::before::before { content: "Hello, world!" }

That would be a <p> element, just inside of which is a box, just
inside of which is a box, just inside of which is a box with the content
"Hello, world!", although unless the two boxes in the middle of that
description have 'content's of their own, then the third and fourth won't
be generated.


> p:not(::first-line)::after { content: ")" }

Syntax error: pseudo-elements not allowed as arguments to ':not()'
selector. Rule ignored.


> li::marker::marker { color: red }

A ::marker pseudo-element must be the last pseudo-element in the chain, so
the first one in that selector isn't valid. Rule ignored.


> If pseudo-elements can occur more than once, there needs to be some
> definition of what it actually *means*.

The CSS3 Generated and Replaced Content Module, to be published shortly,
does exactly this.

The example that Ernest gave in his e-mail:

   ::selection ::first-line

...is invalid because selections never contain elements, so they can never
contain an element's first line.

For that matter,

   ::selection::first-line

...wouldn't make sense either since the selection is always the inner most
pseudo-element. I guess

   ::first-line::selection

...might make some sense but isn't allowed as it would put an
unproportionally large strain on implementors given the limited usefulness
of the construction.

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 1 May 2003 05:30:59 UTC