W3C home > Mailing lists > Public > www-style@w3.org > June 2010

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

From: Håkon Wium Lie <howcome@opera.com>
Date: Tue, 8 Jun 2010 09:31:59 +0200
Message-ID: <19469.61935.375831.68165@gargle.gargle.HOWL>
To: "Andrew Fedoniouk" <news@terrainformatica.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "John Daggett" <jdaggett@mozilla.com>, "MURAKAMI Shinyu" <murakami@antenna.co.jp>, "Boris Zbarsky" <bzbarsky@mit.edu>, "www-style list" <www-style@w3.org>
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. 


              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Tuesday, 8 June 2010 08:07:07 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:36 UTC