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

Håkon Wium Lie wrote:
> Also sprach David Hyatt:
> 
>  > 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.
> 
> So, you are not storing separate values for *-start/end, nor do you
> remember whether the physical values come from *-start/end or not?
>>From this test, it seems you do remember some information:
> 
>   http://people.opera.com/howcome/2010/tests/log.html
> 
> That is, when the direction is changed from ltr to rtl through DOM,
> the padding switches sides.
> 
> -h&kon
>               Håkon Wium Lie                          CTO °þe®ª
> howcome@opera.com                  http://people.opera.com/howcome


That is correct Håkon. The changing of bidirection from ltr to rtl or 
from rtl to ltr changes what side the padding isb on but also many 
other things change or should change.


<http://lists.w3.org/Archives/Public/www-style/2010Mar/0544.html>

<http://lists.w3.org/Archives/Public/www-style/2009Dec/0100.html>


This has it origins with Salar's proposal.


<http://lists.w3.org/Archives/Public/www-style/2009Dec/0088.html>


It would be very simple to just have this CSS.

div {
   float: start;
   margin: 0;
   margin: 100px;
   padding: 0;
   padding-end: 50px;
}


It would appear different depending in the bidirection. Not having 
before, after, start and end requires authors' to have such CSS.

p {
     margin: 10px 20px;
}

p:lang(ja) {
     writing-mode: tb-rl;
     margin: 20px 10px;
}


Or something like this.


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


No matter what bidirection one uses, ones CSS should not be more 
complicated to cater for the ltr world.


-- 
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo

Received on Tuesday, 1 June 2010 08:52:01 UTC