4 ms·
We already have specialized conditionals in CSS, such as @supports, minmax, media queries, etc. if() is just a general purpose conditional. Using if() is goin
by alwillis 1y ago
We already have specialized conditionals in CSS, such as @supports, minmax, media queries, etc.
if() is just a general purpose conditional.
Using if() is going to reduce complexity for a whole range of use cases. Right now, developers are using custom property hacks to simulate true conditionals [1].
[1]: "The --var: ; hack to toggle multiple values with one custom property"—https://lea.verou.me/blog/2020/10/the-var-space-hack-to-toggle-multiple-values-with-one-custom-property/ https://lea.verou.me/blog/2020/10/the-var-space-hack-to-togg...