You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-flexbox] Use flex-order first or document-order first item's baseline? #995
In #197, it was noted that there's an inconsistency between Grid and Flexbox in whether the baseline is taken from the first item in document order or visual order. Grid clearly defines using the visual (grid) order; flexbox should probably account for 'order' and 'flex-direction' as well.
Using visually first flex item definitely makes more sense. As my quick test suggests, browsers also seem to consistently use the visually first item's baseline as a flex container baseline.
Would this be visually first or flex-order first? Given a dom-order 1-2-3 that's flex-ordered 2-1-3 then displayed in a reverse flex container so that it appears on the page as 3-1-2, which item is 'first'?
That's a good question, and I think it should be visually first. The goal of first-baseline alignment is to align the visually first line of text; last-baseline alignment the visually last. Aligning a random line of text somewhere in the middle of the box isn't helpful.
Activity
SelenIT commentedon Feb 1, 2017
Using visually first flex item definitely makes more sense. As my quick test suggests, browsers also seem to consistently use the visually first item's baseline as a flex container baseline.
astearns commentedon Feb 22, 2017
Would this be visually first or flex-order first? Given a dom-order 1-2-3 that's flex-ordered 2-1-3 then displayed in a reverse flex container so that it appears on the page as 3-1-2, which item is 'first'?
fantasai commentedon Feb 23, 2017
That's a good question, and I think it should be visually first. The goal of first-baseline alignment is to align the visually first line of text; last-baseline alignment the visually last. Aligning a random line of text somewhere in the middle of the box isn't helpful.
astearns commentedon Mar 1, 2017
RESOLVED: take the visually first line when considering baseline alignment in flexboxes
tabatkins commentedon Mar 14, 2017
Fixed in 620eb8c.
[css-flexbox] Fortunately, we're tasked with making pretty HTML diffs…