W3C home > Mailing lists > Public > www-style@w3.org > September 2013

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

From: Brad Kemper <brad.kemper@gmail.com>
Date: Wed, 11 Sep 2013 08:12:34 -0700
Message-Id: <868ABD8C-E3E7-466A-88F2-D83C19EDA208@gmail.com>
Cc: Lea Verou <lea@verou.me>, Håkon Wium Lie <howcome@opera.com>, Alan Stearns <stearns@adobe.com>, www-style list <www-style@w3.org>
To: Håkon Wium Lie <howcome@opera.com>
On Sep 11, 2013, at 1:34 AM, Håkon Wium Lie <howcome@opera.com> wrote:

> Two possible solutions are sketched here:
> 
>  http://dev.w3.org/csswg/css-gcpm/#page-and-column-pseudo-elements
> 
> #1, building on pseudo-element:
> 
>  article::page(left) p {   /* select all p elements that appear on left pages in an article */
>    text-align: left;
>  } 

It actually feels more like a pseudo-class to me, though I can understand those who disagree.

> #2, Brad's curly brackets solution
> 
> @page :left {
>  ...
>   {
>      p { text-align: left } /* select all p elements that appear on left pages */
>   }
> }
> 
> I like both syntaxes.

We could have both, actually. One could be syntactic sugar for the other, allowing more freedom for where authors want to write their rules (do I put the 'article:page(right)’ rule right after my 'article' rule, or do I put all the '@page:right' rules together in a block?).
Received on Wednesday, 11 September 2013 15:13:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:34 UTC