Re: [css3-text-layout] New editor's draft - margin-before/after/start/end etc.

Also sprach Andrew Fedoniouk:

 > > 4) media queries: like 3), except that media queries are used instead
 > >   of pseudo-classes:
 > >
 > >   @media (dir: ltr) { body { margin: 10px 20px 30px 40px }}
 > >   @media (dir: rtl) { body { margin: 10px 40px 30px 20px }}
 > >   @media (dir: ttb) { body { margin: 40px 10px 20px 30px }}
 > 
 > I do not see how this is useful.  What if I want part of the page
 > to be TTB and another part to be LTR?

That's easy if we use these definitions:

  dir:lrt   horizontal writing is supported and @dir has been set to 'lrt'
  dir:rtl   horizontal writing is supported and @dir has been set to 'rtl'
  dir:ttb   vertial writing is supported and the initial value of
            'writing-mode' is 'tb-rl'

Then you could do:

  @media (dir: ttb) {
     ...
     table { 
       writing-mode: lr-tb;
       ...
     }
  }

Or, perhaps:

  @media (dir: ltr) {
     ...
     table { 
       writing-mode: tb-lr;
       ...
     }
  }

Expressing this in CSS is easy. Working out the geometrical
constraints is hard. Especially when you add pagination to the mix. 

 > Beg my pardon but can we just leave @media for media?

I'm fine with using pseudo-classes instead. But the two can express
exactly the same, it's only a syntactical difference. 

Cheers,

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

Received on Tuesday, 8 June 2010 08:07:07 UTC