-
Notifications
You must be signed in to change notification settings - Fork 703
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-gaps-1] Auto repeater behavior when number of gaps is less than number of values #11492
Comments
For grid tracks, auto |
That makes sense for grid tracks. For gap decorations it would imply that, if the gap decoration properties specify more gaps than the grid properties, we'd introduce additional empty tracks just to account for the decorations. I was aiming to keep gap decorations purely a paint-time effect and not influence layout, but maybe that's not what authors would expect? |
The CSS Working Group just discussed
The full IRC log of that discussion<TabAtkins> kbabbitt: gut check on a behavior<TabAtkins> kbabbitt: one feature is a repeat() syntax for gap decos <TabAtkins> kbabbitt: if you ahve a grid with unknown number of gaps, can use `repeat(auto, <deco list>)` <TabAtkins> kbabbitt: can combine with decos before and after <TabAtkins> kbabbitt: so like a data grid, black gaps between headings in first/last column, different color in body <kbabbitt> column-rule-color: black repeat(auto, red blue) white; <TabAtkins> kbabbitt: so with one gap, black. two gaps, black white. three gaps: black red white. four gaps+, obvious <fantasai> fantasai: I like it <fantasai> florian: yup <bramus> +1 <fantasai> TabAtkins: agree, it's the right one <fantasai> TabAtkins: aside from in Grids we don't allow partial repetition, matches <TabAtkins> astearns: proposed resolution is that we accept the spec text <TabAtkins> RESOLVED: accept the current spec text |
Gap decoration properties allow a CSS-Grid-like repeat() notation to specify patterns of repeating items. The first parameter to repeat() can be "auto" in which case we generate as many iterations as necessary to cover all the gaps.
The repeat() notation can also be combined with fixed value specifications, for example:
Which would produce a black decoration in the first gap, a white decoration in the last gap, and alternating red and blue decorations in the in-between column gaps.
This leaves open the question of what to do with such a combination when the number of gaps is less than the number of values provided. Currently, the spec prioritizes values before the auto repeater, then values after the auto repeater, then uses the auto repeater to fill in any missing values. Is this the best option?
The text was updated successfully, but these errors were encountered: