- From: MURAKAMI Shinyu <murakami@antenna.co.jp>
- Date: Tue, 28 Sep 2010 17:49:27 +0900
- To: John Daggett <jdaggett@mozilla.com>
- Cc: www-style@w3.org
John Daggett <jdaggett@mozilla.com> wrote on 2010/09/28 16:53:14 > 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> The height of div.level2 is 1em. > > 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; > } No. They are not equivalent. The "physical wins" rule is only effective on a single element after all computed property values are solved. Example: .foo { width: 1in; height: 2in; width: logical 3in; writing-mode: vertical-rl; } computed value of height is 2in. computed value of width is 'logical 3in' ('width: 1in' is overridden in cascading process). actual value of physical height is 2in (physical wins over 'width: logical 3in'). actual value of physical width is auto (not specified, keeps default) -- MURAKAMI Shinyu http://twitter.com/MurakamiShinyu Antenna House Formatter: http://www.antennahouse.com
Received on Tuesday, 28 September 2010 08:50:37 UTC