With some browsers starting to introduce the CSS Houdini API, I was wondering if there were any ways to identify if the CSS Properties and Values API is supported with CSS alone?
With Javascript I'm able to check if the API exists: ✅
typeof window.CSS.registerProperty !== 'undefined'
Are there any equivalences native to CSS? I was experimenting with the @support rule, but this only accepts properties and values -- not 'at-rules'. So the following will understandably not work. ❌
@property --my-color {
syntax: '<color>';
inherits: false;
initial-value: #c0ffee;
}
@supports ( @property : --my-color ) {
body { background:DarkSeaGreen ; }
}
@supports not ( @property : --my-color ) {
body { background:Crimson; }
}
