CSS if() Function: Inline Conditionals in Custom Properties
The CSS if() function: conditional values inside a declaration Until now, CSS chose between values only through selectors and at-rules: a class, a media query, an @supports block, each repeating the property. The if() function puts the condition into the value itself. A component can switch a value based on a custom property, a media…
Details