Re: [csswg-drafts] Proposal: CSS Gap Decorations Level 1 (#10393)

I think this proposal looks really good! So the proposal, skeleton'd, is:

* add `row-rule` to accompany `column-rule`
* (possibly?) add `main-rule` and `cross-rule` for Flexbox (personally I'd prefer to just use row-rule and column-rule)
* allow `*-rule` to accept `/`-separated values, which it'll cycle between as it paints the rules
* add `grid-row/col-rule-area`, which takes a comma-separated list of grid areas, letting you style different segments of the rule. the `row/col-rule` props also accept a comma-separated list, to match up with that list. (Presumably, Flexbox/Masonry could also have their own ways to declare areas, which would match up with the `*-rule` properties in the same way.)
* we ignore gap images for now

The third/fourth bullet points are required to match the usability of table borders, presumably, which makes sense to me. In many cases where you want to style something like a table you *should* be using a table, but that's not always appropriate; calendar, for example, probably can't use tables since there can be overlapping entries.

We will need rules for determining who "wins" for rules bordering two areas, or if you define overlapping areas. I suggest that later areas win. (We lack the hierarchy of table elements that tables have, which let us make reasonable assumptions about which element should win when there's a conflict.)

---------

> The logical equivalents to the *-rule-* properties are important. (Just to note, https://github.com/w3c/csswg-drafts/issues/6748#issuecomment-1036109018 before.)

They're already logical; "row" and "column" are logical terms, see Flexbox and Grid. (And, for that matter, Multicol, where column rules are always block-axis aligned.)

> 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).

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.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10393#issuecomment-2161008801 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 11 June 2024 15:09:36 UTC