News for hackers. Stuff that matters.
Re:CSS now has an if() conditional function by mr_windfrog on Thursday December 04, 2025 @10:42PM (#46156637)
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?
Re:CSS now has an if() conditional function by bawolff on Friday December 05, 2025 @12:01AM (#46156991)
Its 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.

Re:CSS now has an if() conditional function by michaelcampbell on Friday December 05, 2025 @08:10AM (#46160804)
If I'm reading it right, the if condition/predicate can check more things than @media() can.