loading...

re: Why Most Developers Fear CSS VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I am a backend developer and I have no fear of CSS. I just find CSS to be a horrific fractal of bad design (yes, I stole that phrase from elsewher...
 
 

Lack of ability to encapsulate. Working with CSS on even a moderate sized website is like programming a large complex application in a programming language that only supports global variables. Which is bad with one developer, but far worse when there are many working on the same project.

You are able to encapsulate. I often use the architecture ITCSS with naming convention BEM 😃 I use it at a large company, and it's easy for other developers to wrap their head around the concepts.

Actually, you are not able to encapsulate in CSS. What you are talking about is like the ostrich sticking its head in the sand so it cannot see its potential attackers. But its potential attackers can still see it.

The problem with "encapsulation" in CSS is it only works when everyone on the project uses it and uses it the same way. There is no way in CSS for me to write a "module" (for lack of a better word) that someone else cannot override and break with later CSS.

Yes, if you are using CSS you should absolutely employ (something like) ITCSS and BEM, but those are merely ways to reduce the pain of the symptoms of the disease, they do nothing to cure the disease itself.

Code of Conduct Report abuse