- From: Daniel Holbert <dholbert@mozilla.com>
- Date: Mon, 9 Feb 2015 13:58:04 -0800
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: www-style list <www-style@w3.org>
Specifically, I'm curious about this scenario: http://jsfiddle.net/2jftbvyk/ (Basically, we have a vertical flex item with a percent-height child, and which derives its min-content height from a tall grandchild.) UNCONTROVERSIAL: The flex item there -- bordered in orange -- should end up at 200px (taller than its black-bordered parent), because "min-height:auto" prevents it from being smaller than its blue fixed-height grandchild. CONTROVERSIAL: The question is, should that (orange) flex item's height be considered "definite"? According to flexbox section 9.8 #2, the answer is "no" -- it's not definite -- the flex item happens to have a non-definite flex-basis (from "flex: 0 1 auto"), which means its final flexed height is not considered definite. But, the interesting part: if we happen to give it "flex: 0 1 0px" (or even "flex: 0 1 100px") instead, then it will *still* end up at a height of 200px (again, from min-width:auto). BUT, now the spec says that final height SHOULD be considered definite, for some reason -- simply because we started at (and immediately discarded) a definite flex-basis. This inconsistency doesn't make sense to me, though I don't think I have a concrete suggestion for improvement yet. ~Daniel On 02/09/2015 01:43 PM, Daniel Holbert wrote: > On 07/01/2014 09:53 AM, Tab Atkins Jr. wrote: >> fantasai and I discussed this this morning. Based on that discussion, >> and the telcon discussion we had last week, we agree with the >> conclusions of this thread. Namely, percentage heights on children of >> flex items should be resolveable if the item's 'flex-basis' is >> definite; they resolve against the *flexed height* of the flex item >> (not its flex-basis directly). > [...] >> >> (There's still the issue of what happens when the item freezes due to >> a min-height violation based on its min-content size, but that's a >> more general issue than just Flexbox, and we've started a separate >> thread on that.) > > Hi Tab, > > Do you know where this separate thread (which you mentioned having > started, in the parenthetical here) ended up? > > I looked at https://lists.w3.org/Archives/Public/www-style/2014Jul/ and > https://lists.w3.org/Archives/Public/www-style/2014Jun/ , and I saw > several threads about min-height/min-width, but it's not clear to me > which one (if any) actually ended up considering the question of whether > a "min-content"-clamped flex item should be considered as having a > definite height, for the purpose of resolving percent heights on its > children. > > Thanks, > ~Daniel >
Received on Monday, 9 February 2015 21:58:36 UTC