DEV Community

Discussion on: Styling vs Scripting. Which one is the hardest to learn/control?

Collapse
 
sargalias profile image
Spyros Argalias • Edited

I think they're both very difficult because of how much there is to learn and because of how counter-intuitively they seem to work sometimes (they work differently to how you would expect).

I would say styling is both easier and harder. When starting out, I would say it's harder because there are so many unintuitive things and exceptions to rules. Kind of like the JavaScript "this binding" (which is also super unintuitive in my opinion), except tons of things in CSS are like that. Finally, in my experience, developers seem to completely neglect "clean code" and good architecture for CSS, making some projects impossible and far worse than your average JavaScript code.

The good thing is that you can mitigate those problems with CSS by learning from good resources and learning it so well that the unintuitive things are no longer a problem. Also there is far less to learn than with JavaScript or other scripting languages. So that's why I think that aspect of CSS is easier overall.

JavaScript isn't as bad. It's got some weird things (like "this binding") and there is a ton to learn, but those things make good sense in my opinion.

Collapse
 
dennisfrijlink profile image
Dennis Frijlink

Thanks for your detailed answer. I agree with the fact that there is way more to learn in Javascript than in CSS.