DEV Community

Discussion on: I front-end and hate CSS. Here's how I deal with it

Collapse
 
zeachco profile image
Olivier Rousseau • Edited

I have a different opinion:
Knowing that element tags are elements and className attributes are css class names, I find it much easier to create a cognitive separation and less of hassle to know which is what.

I'm sure that styled components wrappers can be good in some different examples (like if you know by the tip of your head every bootstrap components) but I think this is more about people who like XML versus people who like HTML structure (there is a nuance)

Collapse
 
fly profile image
joon

Thank you for pitching in with an opinion Olivier!

Knowing that element tags are elements and className attributes are css class names, I find it much easier to create a cognitive separation and less of hassle to know which is what.
Personally, I respectfully disagree. I do understand the reasons for this opinion and I also half-expect this to be the norm - it's just I think I'm wired differently in some sense. I tried using class names and separate style sheets but found it much more difficult to work with. But I do realize that my structure is flawed in so many different ways(as people have kindly pointed out in the comments), I am going to fix this for the better and try a different approach.

this is more about people who like XML versus people who like HTML structure
I hadn't thought about it this way. Thank you for widening my perspective on the matter! :)

Some comments have been hidden by the post's author - find out more