-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-align] Define align-content: baseline
for flex containers
#3005
Comments
@dholbert Let me know if that's starting to make sense or if I should try to explain it a different way? :) |
Let me compare two examples to make my thoughts a bit clearer. SCENARIO 1:
Here, Thoughts: It makes some sense for SCENARIO 2: consider an example like this, where I've simply added
Here, |
Ah, OK. The flex item is also a flex container. |
align-content: baseline
for flex containers
I think my advice on this point for now would be to pretend it doesn't apply and treat it as |
Right, yeah. (Or hypothetically if the grid item were a flex container -- same issue there.)
OK! That sounds roughly appropriate, yeah. |
(We filed #3052 to track an aspect of this discussion.) |
Ah, spotted the issue with your "Scenario 2" - it turns out that we missed that column flexboxes just plain can't do baseline content-alignment, because the relevant axises aren't lined up. Pushed a commit to say that. |
Right, yeah.
I think so, yeah! Thanks.
Yeah, sorry -- my github-issue-title here was perhaps a bit too broad. Agreed that it's appropriately defined (& now defined more clearly) in Align. My point here was that flexbox in particular had some special cases (column-oriented flexboxes) that didn't mesh with the general definition, but it seems fine now. I'll mark this as "closed" (fixed by your commit above). |
Spec link: https://drafts.csswg.org/css-align/#baseline-align-content
This text has multiple references to the item's "inline axis" -- e.g.
To me, this reliance on the item's "inline axis" indicates that there's an assumption that "align-content" will always be having an impact that is orthogonal to the item's inline axis (i.e. shifting its contents up or down, in a horizontal-tb writing mode).
However: if the item happens to be a flex container with
flex-direction:column
, then align-content operates in the opposite axis from what it would normally operate in. (i.e. it would shift contents right or left, in a horizontal-tb writing mode)So it seems odd that there's a dependency on the element's inline axis in particular -- I think perhaps this spec text really means to say "inline axis [or main axis, if the item is a flex container]"?
Caveat: I haven't implemented this
align-content:baseline
behavior yet, for flexbox -- I'm just trying to wrap my mind around how it should work.CC @tabatkins @fantasai
The text was updated successfully, but these errors were encountered: