7 ms·
I'm not really sure I understand this. How is the new if() conditional function different from using @media (width ...) when adapting layouts to browser width?
by mr_windfrog 10mo ago
I'm not really sure I understand this. How is the new if() conditional function different from using @media (width ...) when adapting layouts to browser width?
- bawolff 10mo agoIts basically the same, just more convinent syntax. I think if can also do string equality on variable values, which is a bit new but also niche. The main point is just to do @media but inside a property decleration.
- michaelcampbell 10mo agoIf I'm reading it right, the if condition/predicate can check more things than @media() can.