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

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

From: Håkon Wium Lie <howcome@opera.com>
Date: Fri, 28 May 2010 20:26:04 +0200
Message-ID: <19456.2748.785737.330973@gargle.gargle.HOWL>
To: Alan Gresley <alan@css-class.com>
Cc: "www-style@w3.org" <www-style@w3.org>
Also sprach Alan Gresley:

 > > So, I'm saying that the problem has a solution today.
 > 
 > Håkon, how does this work with documents with multiple bidirection?
 > 
 > 
 > <http://css-class.com/test/css/bidi/margin-padding-start-end-ltr.htm>

In that document we find:

  .start li {-moz-margin-start:100px;-moz-padding-start:100px;}
  .end li {-moz-margin-end:100px;-moz-padding-end:100px;}

which can be written as:

  .start li { margin-left: 100px; padding-left: 100px }
  .end li { margin-right :100px; padding-right:100px;}

  .start:lang(he), .start:lang(ara) {
    .start li { margin-right: 100px; padding-right: 100px }
    .end li { margin-left :100px; padding-left: 100px;}
  }

Now, there's a bunch of Arabic and Persian language codes, so you would
have to extend the selector to get complete coverage. 

Using language codes as hooks would be an incentive for people to use
language codes. 

Cheers,

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Friday, 28 May 2010 18:26:52 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:27 GMT