Re: [css4-pseudo] multiple and nested pseudo-element ordering

On Tue, Apr 23, 2013 at 10:05 PM, Sam L'ecuyer <sam@cateches.is> wrote:
> Essentially, I'd *expect* that to output `Stock Prices Climb P premium V
> video` with the icon fonts applied.  However, I have two pseudo-elements of
> ordinal "1" and two of ordinal "2" so an implementation may want to output
> `Stock Prices Climb P V premium video`.

Yup, that doesn't work, because we can't treat each *rule* as defining
a different pseudo-element, because you may style the same
pseudo-element in multiple rules (for example, applying a :hover
rule).  The number there isn't just the ordinal, it's the *identity*.

> Perhaps, this should be overcome by
> changing the selectors to
>
> ..headline[data-content-level="premium"]::after(1)
> ..headline[data-content-level="premium"]::after(2)
> ..headline[data-content-type="video"]::after(3)
> ..headline[data-content-type="video"]::after(4)

Yes, you have to do something like this, and you have to simply be
aware of what level each thing is at.  There's no real way to deal
with this. :/

~TJ

Received on Wednesday, 24 April 2013 18:00:32 UTC