- From: Krzysztof Maczyński via GitHub <noreply@w3.org>
- Date: Mon, 06 Apr 2026 15:42:32 +0000
- To: public-css-archive@w3.org
How about this (names free to bikeshed)? ``` rule-at-flex-break: [none | [before | before([<'column-rule'> | <integer>])]? && [after | after([<'column-rule'> | <integer>])]?]!] [/ <integer>]? rule-at-flex-break-skip: <integer> ``` Also `rule-width-at-flex-break`, `rule-style-at-flex-break`, `rule-color-at-flex-break`, with relevant nonterminals in places of `<'column-rule'>` and without the final `[/ <integer>]?`. How would it work? `rule-at-flex-break-skip` (initial value: 1; could be 0 if the WG prefers) determines how many virtual rules are consumed by a flex break, i.e. where in the sequence of rules specified by other properties the UA should continue from for internal gaps in the next flex row relative to what would be the case without a flex break. The final the final `[/ <integer>]`, sets it, if present. `rule-at-flex-break` is a shorthand for the other four (the remaining 3 in the obvious way). With `none` (initial value), no rules are rendered. `before` and `after` allow to render an additional gap with a rule before the flex break, after it, or in both places. The functional variants either specify what rule to use directly, or give offsets with `<integer>` allowing seeking relative to that rule in the sequence. So, `before` is equivalent to `before(0)` and `after` to `after(0)`. Resulting (current + specified offset) values, when non-positive or exceeding sequence length, with `repeat` part absent, wrap modulo. If the `repeat` part is specified, wrapping occurs only within it once it's entered from the start with a large resulting value, or from the end with a non-positive one. (I assume they're numbered from 1.) The `<integer>` in `rule-at-flex-break-skip` behaves likewise. Remaining questions: - The syntax of `rule-width-at-flex-break` is unambiguous without `/`, and the optional <integer> could also be placed anywhere. Should there be any relaxation? - The most useful values for `rule-at-flex-break-skip` seem to be 0, 1, 2 and 3. Should it be limited to those, or to non-negative? Should `<integer>` values in `before()` and `after()` be limited to -1, 0, 1, 2? (Given that it seems easy to implement in full generality, I suggest no.) - Should absolute offsets (e.g. for restarting styles of rules with each flex row) be supported in `rule-at-flex-break-skip`? In `before()` and `after()`? Should two absolute variants be offered: one for the whole sequence, one working just within the `repeat` part (skipping to it if not yet reached)? (What if there's no `repeat` part?) - Should `rule-at-flex-break-skip` (and its shorthand after `/` in `rule-at-flex-break`) alternatively to `<integer>` accept `auto` (and have it as initial) which would take into account whether `before` or `after` (lone or functional) are present (resulting in the same behaviour as 1, 2 or 3)? - Should authors be given ability, what kind and how much, to treat flex rows without internal gaps (with only one item) specially (use case: skip a rule on flex break, but just once if there's a row, or even multiple consecutive ones, without internal gaps)? -- GitHub Notification of comment by ByteEater-pl Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13663#issuecomment-4193252589 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 6 April 2026 15:42:33 UTC