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

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

From: Håkon Wium Lie <howcome@opera.com>
Date: Mon, 9 Sep 2013 18:07:24 +0200
Message-ID: <21037.62012.323308.451862@gargle.gargle.HOWL>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: Håkon Wium Lie <howcome@opera.com>, Lea Verou <lea@verou.me>, Alan Stearns <stearns@adobe.com>, www-style list <www-style@w3.org>
Also sprach Brad Kemper:

 > > I understand your wish for the future, though: to style a element
 > > based on which page it ends up on. What would your ideal syntax look
 > > like?
 > 
 > Too late for my ideal, which was putting selectors directly within
 > @page, and using an inner @rule or something like body to style the
 > box itself. At this point, @content would be OK, but bare curly
 > braces would be better. Like this:
 > 
 > @page :right {
 >    background-color: black;
 >    margin-right:2in;
 >    {
 >        * { color: white; }       
 >        .next-page { background-color: red; float:right-top}
 >        img { float: right-middle; }
 >    }

That could work. Let's see. Hmm. Or, another option may be to base it on:

  http://www.w3.org/TR/css3-gcpm/#selecting-columns-and-pages

So, you could say

  body::page(left) img { float right-middle }

or

  div.chapter::page(2n+1) { background: red }    

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Monday, 9 September 2013 16:08:14 UTC

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