- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 14 May 2025 16:35:25 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-grid] grid-gap is still taking up space when an element defined in grid-template-area is not on the page.`, and agreed to the following: * ``RESOLVED: Start defining a `grid-collapse` property`` <details><summary>The full IRC log of that discussion</summary> <emilio> oriol: the problem here is that's typical for authors when using grid to define some tracks in case some optional content is there<br> <emilio> ... if the optional content is not there, then if they use grid-gap you get extra space<br> <emilio> ... they basically want gaps to collapse together if there's no content in the track<br> <emilio> ... proposal is an `empty-tracks` property with an initial value of `normal`<br> <emilio> ... so empty tracks only collapse gaps with autofit<br> <emilio> ... then another value (`height` for `empty-cells` or `collapse` for consistency for `visibility`) that makes a track with no items in it or crossing it collapse<br> <emilio> ... there's other proposals which would make it collapse only if the sizing function is guaranteed to be zero<br> <emilio> ... or collapsing when the item spans<br> <emilio> ... but that adds a fair amount of complexity, and the simple solution already covers the vast majority of use cases<br> <emilio> ... for other variants we could consider other keywords in the future<br> <astearns> q?<br> <emilio> ... so I'd go with the simplest way<br> <emilio> q+<br> <astearns> ack emilio<br> <emilio> q+<br> <astearns> ack fantasai<br> <emilio> fantasai: I think this value makes sense<br> <emilio> ... some of the other behaviors are probably also valuable<br> <emilio> ... so I think the name should maybe be more extensible<br> <emilio> ... my suggestion is the `grid-collapse` property (`none` / `normal` as initial, `empty-tracks` as the value oriol is proposing)<br> <emilio> astearns: `grid-track-collapse` might be better?<br> <astearns> ack emilio<br> <astearns> q+<br> <emilio> emilio: was going to bring up the name as well<br> <emilio> ... but seems like a good idea<br> <emilio> astearns: Is this always going to be grid specific? Flexbox doesn't have this implicit things, but masonry might?<br> <astearns> ack fantasai<br> <emilio> ... just asking whether this should be layout agnostic since gaps are more layout-agnostic<br> <emilio> fantasai: conceptually it's about collapsing tracks, more than gaps<br> <emilio> ... re. grid vs. masonry they both use the grid-* track management properties<br> <emilio> ... if we're not making it grid specific we could do track-collapse, but I think grid- might make it easier to see they play together<br> <emilio> ... was going to bring up that the default value could maybe be more useful<br> <oriol> q+<br> <emilio> ... maybe if the track is completely empty and there's an intrinsic size it should collapse by default<br> <emilio> ... not sure about compat tho<br> <astearns> ack astearns<br> <emilio> astearns: yeah compat is a bit concerning here<br> <astearns> ack oriol<br> <emilio> oriol: a bit concern about changing the default for web compat<br> <emilio> ... the doing something different when the track sizing function is just intrinsic<br> <emilio> ... might be a bit weird. `auto` is intrinsic, but auto tracks stretches to fill, should it still be considered empty?<br> <emilio> ... this is related to the thing I talked about about whether the track is guaranteed to have a size of zero<br> <emilio> ... so in general more magic behavior worries me<br> <emilio> astearns: so details are going to be fuzzy, but sounds like starting to specify a `grid-track-collapse` prop might be a good idea?<br> <emilio> fantasai: if we call it `grid-collapse` we can expand it to `grid-collapse-{rows,columns}`<br> <kbabbitt> +1 fantasai<br> <emilio> ... the `track-` extra typing might be very wordy. Grid is mostly about tracks<br> <emilio> PROPOSAL: Start defining a `grid-collapse` property<br> <emilio> RESOLVED: Start defining a `grid-collapse` property<br> <fantasai> whereas grid-track-collapse-rows is very redundant<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5813#issuecomment-2880870816 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 14 May 2025 16:35:26 UTC