Hacker News new | ask | show | jobs
by ohrus 2553 days ago
CSS is not a paradigm. Whatever workflow you have for styling your pages and apps, it's all CSS in the end.
2 comments

CSS can certainly be described as a paradigm. It's a model you follow to style things on the web.

It also doesn't matter if it's all CSS in the end. At one particular end it's all manipulating assembly instructions, but I wouldn't call styling pages writing assembly. That is to say the underlying model or paradigm (styling in this case) doesn't really matter if you build an abstraction on top of it that hides that paradigm.

Sure, you're right in that sense, thought I do not agree with the comparison to writing assembly.

The phrase "shifting away" from CSS is what I was addressing my initial comment towards, and I don't believe that using a paradigm on top of CSS would constitute a shift away from CSS... you're still using plenty of CSS rules whether you use styled-components, modules, SCSS, etc.

CSS is absolutely a paradigm. Not the specific style rules that exist in browsers, but the idea of selectors, specificity and stylesheets.

The fact that it's possible to define layout and styling using just style properties is the giveaway.