Web platform features explorer

if()

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

Status

Limited availability

MDN documentation

Browser support

Developer signals

Usage (according to Chrome Platform Status)

~0.120% of page loads. More data at chromestatus.com.

Developer signals

Votes: 3

If you want this feature to be available in all browsers, vote for it by adding a thumbs up reaction (👍) to this GitHub issue, and leave a comment with more information.