News for hackers. Stuff that matters.
Re:Knowing CSS is mastery to Front end Development by madeofpalk on Sunday March 02, 2025 @05:44PM (#43236056)
What are you talking about? CSS is statically typed. It has a fairly strict, well defined schema.
Re:Knowing CSS is mastery to Front end Development by wruza on Sunday March 02, 2025 @07:59PM (#43237155)
Idk what gp meant, but css lacks what could be called “selector accounting”. You never know which parts affect what and whether they affect anything at all. Because instead of importing/use-ing styles or classes, it imposes styles over some unpredictable set of nodes through a selector. On top of that, every name is global.

This contrasts to every modern language, regardless of declarative or not, where to get the effect you import it explicitly into a chunk/block/component/etc.

If css was C, it could add “unsigned” to every first int variable in a function that goes after a typedef. Which was part of “aspect oriented programming”, which was deemed an absurdly bad practice, to put it simply.

Re:Knowing CSS is mastery to Front end Development by maattdd on Sunday March 02, 2025 @05:47PM (#43236085)
Most of CSS is indeed statically typed (property have statically typed valid values). It's not true anymore when you introduce custom properties and IACVT though.
Re:Knowing CSS is mastery to Front end Development by madeofpalk on Sunday March 02, 2025 @06:39PM (#43236524)