If you think CSS is confusing now…

…wait 'till it gets going! :smile:

Yup... each part of the web stack has no idea what it wants to be...

If you need an if, use javascript :stuck_out_tongue_closed_eyes:.

Not saying I think it is a good idea to have this nor saying it’s bad but thinking if it’s a style property I want to change if other style properties meet some conditions then would it not be more convenient all done in css ?

1 Like

I like the idea of conditionals in CSS. There were times when I wanted to make styles conditional, but I couldn't do it in CSS. So, I wrote the JavaScript. I end up using a lot of classList.contains, classList.add, classList.remove, and classList.toggle. :smile:

Yet, I still hesitate to use CSS Variables, even though Internet Explorer is long retired. Even if a feature is supported by all major web browsers today, I still tend to prefer the ancient methods… I still use "for" loops… and only recently did I stop using "var" so much. :smile:

having multiple ways of doing the same things is usually not great when it comes to understanding and debugging. It tends to add complexity, not reduce it.

Logic has always been in the programming domain (javascript), not the styling domain.

Ha, same regarding var. Personally I think consistency on looping is important and for are (imho) the easiest to grok. But this is more stylistic than a determination of the direction of web technologies.