supports(propertyName, value) supports(condition)
There are two distinct parameters:
- propertyName: A string containing the name of the CSS property to check.
- value: A string containing the value of the CSS property to check.
The second syntax takes one parameter condition which contains the condition to check.
Return value: Returns true if the browser supports the rule, otherwise returns false.
Example 2: In the below example, if the value was ‘1%’ instead of ‘green’ the output would be ‘Not supported‘.
Example 3: In this example, the ‘text-overline-color’ CSS property has become obsolete and not supported in today’s modern browser.