Hacker News new | ask | show | jobs
by CharlieDigital 458 days ago
I don't know if I've got it wrong in my head, but at some point it occurred to me that CSS is basically SQL for DOM.

The reason CSS is hard is the same reason that SQL is hard for some.

But I like SQL so I kinda like CSS.

1 comments

> I don't know if I've got it wrong in my head, but at some point it occurred to me that CSS is basically SQL for DOM.

Why? Because it has syntax you despise or what? The syntax (nor semantics of said syntax) is nothing like SQL.

I feel like people who say things like this are just trying to say anything, and it is meaningless. Do you have a take on that?

I love CSS and I love SQL.

Both are declarative query languages over sets and paths.

Except the object with CSS isn't to extract a value, but to apply values (styles).