- From: Simon Sapin <simon.sapin@exyr.org>
- Date: Wed, 09 Apr 2014 10:53:50 +0100
- To: "Tab Atkins Jr." <jackalmage@gmail.com>, Daniel Holbert <dholbert@mozilla.com>
- CC: Greg Whitworth <gwhit@microsoft.com>, fantasai <fantasai@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>, "mstensho@opera.com" <mstensho@opera.com>, "ojan@chromium.org" <ojan@chromium.org>
On 09/04/2014 01:16, Tab Atkins Jr. wrote: > On Mon, Apr 7, 2014 at 10:36 AM, Daniel Holbert <dholbert@mozilla.com> wrote: >> Interesting. >> >> Here's a perhaps simpler case: suppose a vertical flex container has a >> flex item with "height: 10px; flex-basis: 50px", and that flex item has >> a child with a percent-valued height. >> >> Should the percent height resolve against the 10px specified-height, or >> against the flex-basis (which we can reliably know ahead of time is what >> its used height will end up resolving to)? >> >> Testcase: http://jsfiddle.net/LcL8U/ >> >> CSS21 says this about percent height values: >> # The percentage is calculated with respect to the >> # height of the generated box's containing block. >> # If the height of the containing block is not >> # specified explicitly (i.e., it depends on content >> # height), and this element is not absolutely >> # positioned, the value computes to 'auto'." >> http://www.w3.org/TR/CSS21/visudet.html#propdef-height >> >> (We can disregard the second half of this spec text here, since there's >> clearly no dependence on content in my or Greg's example, and no browser >> seems to be treating the percent height as "auto".) > > Sigh, bad application of errata strikes again! (We errata'd that to > happen at used-value time instead.) Daniel, you may want to look at the ED, which has errata applied: http://dev.w3.org/csswg/css2/ (This exact bit was actually missing, but I fixed it yesterday and went through the rest of the CSS 2 errata to double-check the ED.) When looking at /TR, readers are apparently expected to look at the errata document at all times and do mental the substitution themselves. This just doesn’t work IMO. >> So the question is, what is the "height of the box's containing block". >> Blink seems to be saying it's the specified "height" property, while >> Gecko/Trident are using the actual box's height (the flex basis). Since >> the CSS21 spec text [quoted above] seems to be talking about box height >> rather than the "height" property here, I tend to think the >> Gecko/Trident behavior is correct. > > Yes, it's the actual height (the flex basis). I think the spec is > clear about this, but I can correct something if it's not. -- Simon Sapin
Received on Wednesday, 9 April 2014 09:54:27 UTC