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 12:23:28 +0200
Message-ID: <21037.41376.857323.161301@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:

 > > If you want different sidenotes for left and right pages, you can use
 > > the @sidenote construct:
 > > 
 > >  @page :left {
 > >    @sidenote {
 > >      border-radius: 0.2em 0 0 0.2em; 
 > >  }}
 > >  @page :right {
 > >    @sidenote {
 > >      border-radius: 0 0.4em 0.4em 0;
 > >  }}
 > My main point is that you shouldn't have that power only for a side
 > note or footnote or element in a margin box. It should be just as
 > easy to selectively style any element within the main content area,
 > based on the page-selecting @rule.

My suggested code above was meant as practical suggestions -- it's
specified, implemented and usable today -- as the PDF shows:


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

 > Also, your rule above means that _everything_ floated into a
 > sidenote gets a border-radius

That's not what the spec intends. Foonote and sidebar areas are styled
as areas -- not as elements. So, in this footnotes test:


There's one (clipped) border above the footnote area which holds two
footnotes. Here are two renderings:


Now, AH's sidebar implementation will style each element floated into
the area. I believe this is a bug.

              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Monday, 9 September 2013 10:24:13 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:32 UTC