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

Re: [css3-writing-modes] a third option for implementing logical properties

From: L. David Baron <dbaron@dbaron.org>
Date: Thu, 21 Oct 2010 17:21:11 -0700
To: Brad Kemper <brad.kemper@gmail.com>
Cc: David Hyatt <hyatt@apple.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <20101022002111.GA22702@pickering.dbaron.org>
On Thursday 2010-10-21 17:09 -0700, Brad Kemper wrote:
> Is there any particular downside to treating them like the same
> property, as though margin-start was just a 1-component shorthand
> for margin-left?

You don't know which side margin-start is until you know which
element the rule applies to and what that element's direction is.
So you have to store it differently.

For example, in:
  ul { margin-start: 3em }
  ul#foo { direction: ltr }
  ul#bar { direction: rtl }
the margin-start is sometimes margin-left and sometimes
margin-right.

> I had kind of assumed that the effect on margin-left in the
> example would the same whether you used 'margin-start' or just
> 'margin' (ignoring, for the moment the effect of  'margin' on
> 'margin-right', etc.). 

One could change the example to manipulate a style rule in a style
sheet rather than a style attribute, and thus have the same problem
as what I gave above.

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Friday, 22 October 2010 00:21:44 GMT

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