News for hackers. Stuff that matters.
Re:CSS coding techniques by babbeloski on Friday May 20, 2016 @08:14AM (#11737137)
KISS:

- Only use cascading for global theme styles, like type faces

- Don't nest rules with sass or w/e, it's too hard to know what's affecting what in a template

- Naming conventions: Prefix every component class with the titlecased version of the name, have one css file per component that's of the same name. This makes it easy to know where to look for styles when you're working in a template. e.g. styles/header.css would contain:

  - .Header-container .Header-link .Header-title--hover .Header-image
Re:CSS coding techniques by Roboprog on Friday May 20, 2016 @12:40PM (#11739296)
I guess I can agree with that, in spirit. My CSS include file has very broad look and feel stuff. There is also a CSS block inside some pages that customizes size / layout stuff that only applies to that page (e.g. - fieldset and label widths based on content of various blocks).