| Basic @supports usage In terms of syntax, @supports is very similar to @media, but instead of detecting screen size and orientation, @supports will detect whether the browser can handle a given CSS rule. Rather than doing something like @supports (flex), notice that the rule is @supports (display: flex). |
| Chaining feature detections To detect multiple features at once, use the and operator. There is also an or operator and a not operator: For the ultimate @supports experience, try grouping logical expressions with parenthesis: This will work if the browser - Supports
display: block AND zoom: 1, or - Supports
display: flex AND NOT display: table-cell, or - Supports
transform: translateX(1px). Syntax - @supports [condition] { /_ CSS rules to apply _/ }
Parameters | Parameter | Details | (property: value) | Evaluates true if the browser can handle the CSS rule. The parenthesis around the rule are required. | and | Returns true only if both the previous and next conditions are true. | not | Negates the next condition | or | Returns true if either the previous or next condition is true. | (...) | Groups conditions | Feature detection using @supports is supported in Edge, Chrome, Firefox, Opera, and Safari 9 and up. |