-
Notifications
You must be signed in to change notification settings - Fork 661
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] Inconsistent fallback alignments for space-between and space-around/evenly #10154
Comments
There's two effects that this controls:
Wrt rationale:
Proposal: Update |
IMO the weird/confusing thing in the spec is For example the spec for
Could be adjusted to say something like: "If there is only a single alignment subject then available space is evenly distributed at either end". Or the ratio formula for dividing the available space (1:2:2:2:1) could be stated more explicitly in a way that is still works in the case that there are no spaces between alignment subjects. Then the concept of fallback would only be required in the case of overflow and would be much more straightforward: just specifying a fallback to either |
The CSS Working Group just discussed
The full IRC log of that discussion<TabAtkins> fantasai: this is about fallback behavior of the content-distribution keywords: space-between/around/evently<TabAtkins> fantasai: Oriol pointed out the inconsistentcy, around/evenly do "safe" alignment <TabAtkins> fantasai: So if the lone item overflows, the item won't overflow the start edge, to avoid clipping <TabAtkins> fantasai: but -between doesn't have that <TabAtkins> fantasai: So proposal is to change the fallback from "flex-start" to "safe flex-start" <TabAtkins> TabAtkins: [explains the issue] <TabAtkins> fantasai: start doesnt' overflow into unscrollable region <TabAtkins> fantasai: but flex-start *can* if you reverse a flexbox, then it's end-aligning <TabAtkins> dholbert: This makes sense to me <TabAtkins> chrishtr: Do you think there's a compat risk? <TabAtkins> fantasai: I doubt it. If you're using these keywords you expect yoru content to have mutliple items, and the items smaller than the CB. <TabAtkins> dholbert: Agree, "safe" coming into play seems rare here, so it seems nice from a consistency perspective, and when it *does* activate it's an improvement in behavior <TabAtkins> chrishtr: okay <dbaron> This is changing the failure fallback case inside of a different failure fallback case :-) <TabAtkins> iank_: We've taken some compat pain for these properties, it would be nice to have the other browsers get some safety here <iank_> looks good <TabAtkins> failure 1: you only have one item instead of multiple. failure 2: that item is bigger than the containing block. (and qualifier 3: you're in a reverse flexbox) <TabAtkins> proposed resolution: Update the fallback for space-between to add "safe" <TabAtkins> RESOLVED: Update the fallback for space-between to add "safe" |
Flexbox spec also needs updating here. |
https://drafts.csswg.org/css-align/#distribution-values
space-between
flex-start
space-around
safe center
space-evenly
safe center
As per https://drafts.csswg.org/css-align/#valdef-overflow-position-safe,
safe center
will basically behave asstart
, which differs from theflex-start
ofspace-between
.Blink seems to treat all of them as
flex-start
The text was updated successfully, but these errors were encountered: