w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.51k stars 671 forks source link

[css-align] Allow authors to choose a fallback alignment for distributed alignments #11259

Open Loirooriol opened 22 hours ago

Loirooriol commented 22 hours ago

The fallback alignment for distributed alignments is:

However, authors may want different fallbacks, e.g. #11244 wants space-between but falling back to safe center instead of safe flex-start. I could also imagine wanting e.g. space-evenly but falling back to unsafe center.

So we could generalize the syntax from https://drafts.csswg.org/css-align/#align-justify-content, e.g.

<'align-content'> = normal | <content-distribution> | <foo> | <content-distribution>, <foo>
<foo> = <baseline-position> | <overflow-position>? <content-position>

<'justify-content'> = normal | <content-distribution> | <bar> | <content-distribution>, <bar>
<bar> = <overflow-position>? [ <content-position> | left | right ]