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: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 26 May 2010 15:32:35 -0400
Message-ID: <4BFD7753.8020606@mit.edu>
To: David Hyatt <hyatt@apple.com>
CC: www-style list <www-style@w3.org>
On 5/26/10 3:13 PM, David Hyatt wrote:
>> Mozilla and WebKit already implemented *-start and *-end properties:
>> http://help.dottoro.com/lcqbjiaw.php
>> https://developer.mozilla.org/En/CSS:-moz-margin-start
>> http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html#//apple_ref/doc/uid/TP30001266--webkit-margin-start
> I can't speak for Mozilla, but in WebKit our *-start and *-end properties are faked.  When applied to an element they resolve immediately to left or right (depending on the direction).  We don't carry around a real notion (possibly inherited) that the start side should be used. In other words, if you have a RTL block inside a LTR block and the LTR block has margin-start:20px on it, and the RTL block has margin: inherit on it, you will get a left margin of 20px on the RTL block.

In mozilla's implementation, *-start and *-end are effectively converted 
into *-left and *-right as needed when determining computed values. 
There is no separate computed value for *-start and *-end.  A specified 
value like "*-start: inherit" in treated as either "*-left: inherit" or 
"*-right: inherit" depending on the directionality of the thing doing 
the inheriting.  But the value inherited will obviously depend on the 
directionality of the parent, if the parent itself had a "*-start" 

All of which sounds similar to what you describe for webkit.

Received on Wednesday, 26 May 2010 19:33:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:46 UTC