Supercharge QA with AI for Faster & Smarter Software Testing

The if CSS function allows different values to be set for a property depending on the result of a conditional test. The test can be based on a style query, a media query, or a feature query.
Last updated on : 2026-02-09
Browser Versions
IE
Edge
Firefox
Chrome
Safari
Opera
Fully Supported
Partially
No Support
CSS if() function on IE is not supported on any IE versions.
CSS if() function on Edge is fully supported on 137-144, and not supported on 12-136 Edge versions.
CSS if() function on Firefox is not supported on any Firefox versions.
CSS if() function on Chrome is fully supported on 137-147, and not supported on 4-136 Chrome versions.
CSS if() function on Safari is not supported on any Safari versions.
CSS if() function on Opera is fully supported on 121-122, and not supported on 9.5-125 Opera versions.
CSS if() function on Safari on iOS is not supported on any Safari on iOS versions.
CSS if() function on Android Browser is fully supported on 138-144, and not supported on 2.3-4 Android Browser versions.
CSS if() function on Opera Mobile is not supported on any Opera Mobile versions.
CSS if() function on Chrome for Android is fully supported on all Chrome for Android versions.
CSS if() function on Firefox for Android is not supported on any Firefox for Android versions.
CSS if() function on Samsung Internet is not supported on any Samsung Internet versions.
Data sourced from
Overall Browser Compatibility Score
Note:CSS if() function shows a browser compatibility score of 22. This is a collective score out of 100 to represent browser support of a web technology. The higher this score is, the greater is the browser compatibility. The browser compatibility score is not a 100% reflection for every browser and the web technology support. However, it does give you an estimate on how much you should rely on a particular web technology in terms of browser compatibility.
Test on 3000+ browsers for CSS if() function & more
Test your website for CSS if() function and other web technologies. Get 100 FREE automation test minutes!
Test NowDid you find this page helpful?
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance