CSS is getting a new @supports function called named-feature(a-feature-name)
See also:
Example of how you might use it:
@supports named-feature(align-content-on-display-block) { ... CSS rules here ... }
@supports named-feature(anchor-position-follows-transforms) { ... CSS rules here ... }
The general idea is that some CSS features are impossible to detect by the current @supports rule. For example, you can't currently test if align-content is supported in the context of display:block elements. The explainer proposes to create new unique IDs for these cases, so developers can use them in the new named-feature() function.
This immediately made me think of web-features IDs. Should we engage with the CSSWG and discuss about this?
CSS is getting a new
@supportsfunction callednamed-feature(a-feature-name)See also:
Example of how you might use it:
@supports named-feature(align-content-on-display-block) { ... CSS rules here ... }@supports named-feature(anchor-position-follows-transforms) { ... CSS rules here ... }The general idea is that some CSS features are impossible to detect by the current
@supportsrule. For example, you can't currently test ifalign-contentis supported in the context ofdisplay:blockelements. The explainer proposes to create new unique IDs for these cases, so developers can use them in the newnamed-feature()function.This immediately made me think of web-features IDs. Should we engage with the CSSWG and discuss about this?