Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[css-flexbox][css-grid] Spec doesn't say whether "overflow: [non-visible]" on flex/grid container triggers a different baseline (as it does for inline-block) #2902
In the CSS2 spec section about baselines of inline-blocks, there's a special case for
The flexbox/grid specs don't have any such special case, so I'm left wondering whether they should implicitly behave like inline-blocks in this respect. The flexbox/grid specs do have some text about baselines of scrollable things, but I don't think it helps here -- if I'm understanding correctly, that text is about flex/grid items (it's about the box contributing a baseline to the flex/grid container, and cases where that box is scrollable).
Browsers disagree on this baseline-determination right now, so we don't have interoperability on this point (testcase: https://jsfiddle.net/06wxgroy/ ). Firefox uses the margin-bottom as the baseline (consistent with
Could the spec editors or CSSWG weigh in on this and update the spec to clarify what the expected behavior is?
 https://drafts.csswg.org/css2/visudet.html#leading "The baseline of an 'inline-block' is ..., unless it has either no in-flow line boxes or if its 'overflow' property has a computed value other than 'visible', in which case the baseline is the bottom margin edge."
AFAIK, that special case is not supposed to apply anywhere else, so the usual rules apply: last paragraph of https://drafts.csswg.org/css-align/#baseline-export
Thanks -- that chunk of spec text does seem like the most relevant text that describes what should happen here (for
Having said that -- it seems quite weird that