Re: [csswg-drafts] [css-conditional] testing support of properties and values with partial implementations (#3559)

I was recently [experimenting with some unrelated things](https://kizu.dev/shrinkwrap-problem/#return-of-the-inline-blocks), where I used inline-blocks for a layout, and I really missed the absence of a `gap` in the normal flow. If we did have an ability to detect partial implementations like this, it could be more likely that we could get it (“normal flow gap”), as well as other similar cases (extending some very specific property to work in different contexts).

The absence of the ability to easily detect the `flex` + `gap` support is also a reason why our design system currently has a legacy workaround for the flex “gap” using margins: it is not trivial to migrate to native `gap`.

I really like the idea of using something like `(gap: 1px) with (display: flex)` as a way to test how multiple properties & their values interact.

Though I can see the challenge in how that could be defined, and for authors it might be confusing trying to understand which pairs of properties they could use in `@supports` like that.

We don't have many places like this outside of `gap`, so I think having a “hardcoded” syntax like `@supports (gap: 1px !flex)` could work. Maybe not exactly like this, but the idea is for any properties+value pairs that get changes in the specs/implementations that require different type of support detection, to have an explicitly defined “supports flag” which could be used only as a part of `@supports`.

I do think this case is exceptional enough that not coming up with an abstract “ideal” solution is worth it here, and in this case, it is better to get a working solution sooner rather than later. 

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


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

Received on Saturday, 23 December 2023 01:10:33 UTC