Web platform features explorer

if()

Limited availability
Groups: CSS

The if() CSS function is an inline conditional value that returns a value based on a set of conditions.

Learn more

No MDN documentation found. You can search for the feature on MDN. If you believe that MDN has no documentation about this feature, you can open an issue on MDN's GitHub repository.

Browser support

  • Chrome
  • Chrome Android
  • Edge
  • Firefox
  • Firefox for Android
  • Safari
  • Safari on iOS

Usage (according to Chrome Platform Status)

~0.109% of page loads. More data at chromestatus.