Re: [csswg-drafts] [css-grid] grid-gap is still taking up space when an element defined in grid-template-area is not on the page. (#5813)

This came up for a component in our design system. We’d like to set up grid columns as slots for decorations/actions, but then have the tracks + gaps collapse when there’s nothing slotted in them. For now we need to use `:has()` on the grid container to adjust the layout, but we need to include a fallback for browsers without support for that. It’s nice that we can do this with `:has()`, but it would be nicer if we could use a single template as the `:has()` solution adds a fair bit of complexity to our styles.

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


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

Received on Wednesday, 19 February 2025 04:22:03 UTC