Re: [css3-page][css-gcpm] Styling elements differently based on whether they appear on a left or right page

On Sep 12, 2013, at 00:50, "Simon Pieters" <simonp@opera.com> wrote:

> On Thu, 12 Sep 2013 00:26:43 +0200, Lea Verou <lea@verou.me> wrote:
> 
> So the selector was
> 
> article::page(left) p
> 
> now consider
> [snip]

Actually, that’s a very good point, but not for the reason you posted it. This is not possible AT ALL if ::page() is a pseudoelement, as elements cannot be nested in pseudoelements: “the pseudo-element must appear after the compound selector that represents the subjects of the selector” [1]
However, it doesn’t make sense for it to be a pseudo-class either, for the reason I mentioned in my previous message. Therefore, it follows that the only possible solution is nesting if we want this kind of flexibility.
Unless we define the pseudo-class as "where the element starts" and use the existing :page() pseudos [2] for styling the rest of the fragments. But that’s really clumsy.

[1]: http://www.w3.org/TR/selectors4/#pseudo-elements
[2]: http://www.w3.org/TR/css3-gcpm/#selecting-columns-and-pages

Received on Wednesday, 11 September 2013 22:57:00 UTC