DEV Community

Discussion on: Why is CSS Hated On?

peerreynders profile image
peerreynders • Edited on

When people talk about programming they are usually referring to imperative programming and CSS is declarative. Experience with imperative programming is no help with CSS or visual design.

It wasn't until ITCSS that I got a better grasp on the design philosophy behind CSS.

And frustratingly learning CSS doesn't move towards building design skills. Those are separate, unconnected skills and people don't usually practice design in the browser anyway. Web designers handing over designs to front-end developers smacks a bit of waterfall to me.

Right now everything is component-oriented and while CSS can be used for components it's much broader than that. As outlined by CUBE CSS it all starts with the page composition—that's an "outside-in" approach while components are an "inside-out" approach.

CSS was deliberately designed to let the global visual design "leak" into the blocks in order to create a more cohesive overall look.

Components tend to want to be autonomous and protective about their styling but often don't differentiate between their structure and skin (i.e. the global design should affect the skin but not the structure). So often components need to utilize design tokens in order to be consistent with the global, overall design.