Re: [css3-writing-modes] Request to publish Last Call Working Draft

On 27/05/2011 7:23 PM, Aharon (Vladimir) Lanin wrote:
> What I meant re a conflict between the logical and physical properties is
> this:
>
> .foo {
>    padding-start: 10px;
>    padding-left: 20px;
> }
>
> .bar {
>    padding-left:20px;
>    padding-start: 10px;
> }
>
> My guess is that with these classes, a<span class="foo" dir="rtl">  or a
> <span class="bar" dir="rtl">  should have a 10px right padding and a 20px
> left padding.

No. Neither of them have right padding since you haven't declared a 
right padding to begin with. You have declared one visual side (left) 
and one logical side (start). Visually there may be what is perceived as 
a right padding but that is only since logical in RTL text is on the 
visual right, not padding right.

> On the other hand, with dir="ltr", neither will have a right padding.

Correct but that's because you haven't declared a right padding to begin 
with.

> The
> question is what the left padding should be.

If both the visual side (left) and the logical side (start) are 
referring to the same visual (physical) left, then I would presume that 
an implementation would use an algorithm to determine which one of the 
declarations has the greatest value and this would become the computed 
value. Something like an 'if' statement in JS.

> One approach would be to say
> that either the physical or the logical property always wins, in which case
> both spans will have the same left padding.

Yes but not because a value wins (I understand the concept of win when 
used with cascadence) but because an implementation using an algorithm 
would understand that the visual and logical values are referring the 
same side.

> Another would be to say that the
> "last specified" would win as usual, in which case the left padding will be
> 20px on the foo span and 10px on the bar span. I was not sure that this is
> really an option, though, because of the implementation difficulty.

That wouldn't make scene since there is no cacadence in play. Remember 
padding-start and padding-left are two different values.


-- 
Alan Gresley
http://css-3d.org/
http://css-class.com/

Received on Friday, 27 May 2011 16:32:31 UTC