- From: Kevin Babbitt via GitHub <sysbot+gh@w3.org>
- Date: Mon, 13 Jan 2025 22:50:25 +0000
- To: public-css-archive@w3.org
kbabbitt has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-gaps-1] Grammar for expanded column-rule shorthand == Gaps 1 [extends the definitions of the column-rule-* properties](https://drafts.csswg.org/css-gaps-1/#color-style-width) to allow for lists of values. It would be desirable to expand support for multiple values to the column-rule shorthand as well. The [existing column-rule property](https://drafts.csswg.org/css-multicol-1/#cr) grammar is: ``` <'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'> ``` The [expanded column-rule property](https://drafts.csswg.org/css-gaps-1/#gap-decoration-shorthands) grammar I currently have drafted in Gaps 1 is: ``` <gap-rule-list> = <gap-rule-or-repeat> [ / <gap-rule-or-repeat> ]* <auto-gap-rule-list> = [ [ <gap-rule-or-repeat> ] / ]* <auto-repeat-gap-rule> [ / [ <gap-rule-or-repeat> ] ]* <gap-rule-or-repeat> = [ <gap-rule> | <repeat-gap-rule> ] <repeat-gap-rule> = repeat( [ <integer [1,∞]> ] , [ <gap-rule> ]# ) <auto-repeat-gap-rule> = repeat( auto , [ <gap-rule> ]# ) <gap-rule> = [ <line-width> || <line-style> || <color> ] ``` Note the introduction of the slashes to separate width-style-color tuples from each other. I introduced these because I wasn't sure if free-form mixing of subproperty values (for example, `column-rule: 1px 5px solid black`) would be sufficiently future-proof. I could have also used commas, but I'd prefer to reserve those for future extension of the grammar to support [gap decoration areas](https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/CSSGapDecorations/explainer.md#placement-of-gap-decorations). In the [initial proposal discussion](https://github.com/w3c/csswg-drafts/issues/10393) and in the F2F meeting, I got some comments about the use of slashes: @SebastianZ: > The mix of slashes and commas in the syntaxes needs to be discussed, especially in regard of a possible gap-rule shorthand (as mentioned in the explainer). @tabatkins: > Yes, we need to be careful with this. In general we want to minimize the use of slashes; they tend to be confusing, especially when mixed with commas. (We're consistent with which separator wins wrt grouping, and this proposal follows that practice, but still.) Maybe we can do a cycling function or something to make it more obvious. > <dbaron> TabAtkins: I don't like use of slashes mixed with commas more than we usually like. We can do that later, such as with a wrapping function. I wanted to get more input on this topic. I can see a few different options: 1. No separators needed; width/style/color values are distinguishable from each other and we're unlikely to run into future issues 2. Slashes, as currently drafted 3. Commas, because that would be consistent with other contexts such as backgrounds, borders, transitions, and animations, and we can figure out an alternative for gap decoration areas later 4. Some new functional notation for grouping, e.g. `decoration()` where the grammar inside the parenthesis takes at most one value or repeater for each of width/style/color What do folks think? Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11496 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 13 January 2025 22:50:26 UTC