Re: [css3-writing-modes] yet another logical property and writing mode proposal

John Daggett <jdaggett@mozilla.com> wrote on 2010/09/28 15:08:35
> Shinyu Murakami wrote:
> 
> > | Shorthands:
> > |
> > |     margin: [physical?|logical] <margin-width>{1,4}
> > |             | <margin-width>{1,4} [physical?|logical]
> > |
> > |     [physical?|logical] is a flag that determines whether the values should be
> > |     assigned to top/right/bottom/left or before/start/after/end. Since 'physical'
> > |     is the default interpretation, the flag may be omitted
> > 
> > Other examples:
> > 
> >     width: logical 100%;  /* logical width = physical height in vertical writing mode */
> > 
> >     top: logical 3cm;     /* physical right in vertical-rl mode */
> 
> I don't think this quite works, this proposal effectively allows
> several properties to alias the same effective value with no way of
> clearly resolving precedence.
> 
>   body { writing-mode: vertical-rl: }
>   .level1 { height: 2em; }
>   .level2 { width: logical 1em; }
>   .level3 { height: 3em; }
>   
>   <div class="level1">
>     <div class="level2">
>       <div class="level3">
>         What's my height?
>       </div>
>     </div>
>   </div>
>   
> What's the height applied to the inner-most div element?  The resolved
> width would be 'logical 1em' and the height would be '3em'.  Which
> applies?

3em.
In this case, .level2 { width: logical 1em; } sets the actual 
value of 'height' of div.level2 to 1em.
But inner-most is .level3 { height: 3em; }.

If 'width: logical 1em' and 'height: 3em' are specified in a same element,
'height: 3em' wins because the physical has precedence.
I wrote:
> If physical and logical specifications are in conflict, the physical one wins:
> 
>     /* in RTL mode, */
>     margin-right: 3em;
>     margin-left: logical 2em; /* = margin start = margin right in RTL mode */
>     /* margin-right: 3em (physical) wins over 2em (logical) */

-- 
MURAKAMI Shinyu
http://twitter.com/MurakamiShinyu
Antenna House Formatter:
http://www.antennahouse.com

Received on Tuesday, 28 September 2010 07:28:28 UTC