- From: John Daggett <jdaggett@mozilla.com>
- Date: Tue, 28 Sep 2010 00:53:14 -0700 (PDT)
- To: MURAKAMI Shinyu <murakami@antenna.co.jp>
- Cc: www-style@w3.org
Shinyu Murakami wrote:
> > 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.
Hmmm, so you're saying the height of div.level2 would be 1em, as in
the simplified example below?
body { writing-mode: vertical-rl: }
.level1 { height: 2em; }
.level2 { width: logical 1em; }
.level3 { height: 3em; }
<div class="level1">
<div class="level2">
What's my height?
</div>
</div>
Based on the "physical wins" rule it seems like the height of div.level2
should be 2em since it's equivalent to this:
div.level2 {
height: 2em;
width: logical 1em;
}
Cheers,
John
Received on Tuesday, 28 September 2010 07:54:19 UTC