Using pure CSS, you can sort of rely on the cascade to determine whether a browser understands @supports
by making a @supports
rule with a universally-supported declaration, such as a color
declaration, and overriding another such rule that is declared globally:
#test {
color: red;
}
@supports (color: green) {
#test {
color: green;
}
}
See my answer to this question for a detailed explanation of the pure CSS method.
If you're looking to detect it using JavaScript, you can use the Modernizr feature detection library as mentioned in the comments (be sure to include css-supports in your download config):
if (Modernizr.supports) {
console.log('Your browser supports @supports.');
} else {
console.log('Your browser does not support @supports.');
}