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: Alan Gresley <alan@css-class.com>
Date: Sat, 29 May 2010 03:49:32 +1000
Message-ID: <4C00022C.3060103@css-class.com>
To: Håkon Wium Lie <howcome@opera.com>
CC: Sylvain Galineau <sylvaing@microsoft.com>, "www-style@w3.org" <www-style@w3.org>
Håkon Wium Lie wrote:
> Also sprach Sylvain Galineau:
> 
>  > According to CSS2.1 : "If there are two values, the top and bottom margins
>  > are set to the first value and the right and left margins are set to the second."
>  > 
>  > So you're effectively saying that margin: 20px 10px would result in the application
>  > of logical margins based on the writing-mode and/or :lang() but if the author writes:
>  > 
>  > p:lang(ja) {
>  >       writing-mode: tb-rl;
>  > 	margin-top:20px;
>  > 	margin-bottom:20px;
>  > 	margin-left: 10px;
>  > 	margin-right: 10px;
>  > }
>  > 
>  > ...which per CSS2.1 is equivalent, then the margin values would be set physically instead ?
> 
> There are only physical values in my examples. This code:
> 
>   p { margin: 10px 20px }
>   p:lang(ja) {
>     writing-mode: tb-rl;
>     margin: 20px 10px;
>   }
> 
> illustrates how you can achieve automatic switching of values (as in,
> "I'd like 10px margins before and after, and 20px margins at the start
> and end") without introducing new properties/values.
> 
> 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>


How many p:lang(...) rule sets would be required for the above document?


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

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
Received on Friday, 28 May 2010 17:50:04 GMT

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