DEV Community

Discussion on: What do you find the most difficult with CSS?

Collapse
 
danburzo profile image
Dan Burzo • Edited

Finding the balance between touching the HTML vs. touching the CSS approaches; the first being oriented on providing CSS utilities you can compose by attaching classes to elements, while the latter insisting on semantic markup that gets appropriate styles via CSS (either through repetition or through a preprocessor that does the composing).

Basically: methodology. Seeing in patterns. I'm still formulating mine :-)

Mental models and associated rules of thumb help. For example: margin = external geometry, padding / border = internal. Associated rule: handle external geometry in the parent container, not the element itself. Et cetera.