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

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:

  http://people.opera.com/howcome/2013/tests/css-gcpm/sidenote-ah.pdf

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?

 > 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:

  http://people.opera.com/howcome/2013/tests/css-gcpm/footnotes.html

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

  http://people.opera.com/howcome/2013/tests/css-gcpm/footnotes-ah.pdf
  http://people.opera.com/howcome/2013/tests/css-gcpm/footnotes-ah.pdf

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

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome

Received on Monday, 9 September 2013 10:24:13 UTC