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

Thanks for bringing this topic back again and providing a different approach to it!

Just a quick note, @rachelandrew, @tantek and I discussed a way forward for gap decorations as well in a breakout session at last year's F2F meeting in Cupertino. Unfortunately, I never actually took the time to write down our conclusions for a level 1 of this feature. So I take this opportunity to do that now and also comment on your proposal. What we concluded back then was (Rachel, Tantek, please correct me if I'm misremembering!):

* To make progress and raise implementer interest, the feature should be reduced to an MVP for level 1
   * Allow just lines following the syntax of `column-rule`
   * Define a simple gap intersection behavior for column and row rules (draw or clip the rule)
   * Allow to extend or shrink the rules regarding intersections and edges
   * Gap images are very complex and should be postponed
   * Alignment of the rules within the gutters should be postponed
   * Control over the painting order should also be postponed
* Add `row-rule` and the related longhands as a complement to `column-rule` and its longhands
* Make this feature apply to Grid, Flexbox, Masonry, Multi-column, and (possibly) Table Layout
* Open questions:
   * How to handle rules at empty (grid) areas?
   * How to handle Subgrid?
   * How should rules behave regarding intersections in non-grid layouts (i.e. Flexbox and Masonry)?

-----

Regarding your proposal, here a few quick thoughts after skimming through the explainer and the draft spec:

* Overall, the proposal looks very good already! The syntaxes are simple and at the same time it covers a variety of use cases.
* Gap decoration areas are a fantastic idea and do have strong use cases. Though they also add a lot of complexity. So I'd rather not include them in level 1 and discuss them separately.
* I love the idea of varying gap decorations! But this also adds some complexity, especially, if they are meant to apply to all mentioned layout types.
* The logical equivalents to the `*-rule-*` properties are important. (Just to note, [they _were_ mentioned](https://github.com/w3c/csswg-drafts/issues/6748#issuecomment-1036109018) before.)
* 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).

Sebastian

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


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

Received on Wednesday, 5 June 2024 22:57:19 UTC