

Ask HN: CSS architecture techniques? - CoffeeDregs

After writing lots of CSS in lots of client sites, I'm definitely missing a Grand Unified Theory of CSS.  I understand that the GUT may not be available to me when operating in other people's sandboxes, but still...  So I'm looking for best practices on high level CSS architecture/organization.  Should I:<p>* Minimize the length of a selector to make it general?  Maximize it to make it specific?  (I tend to be hyper-specific)<p>* Use a standard hierarchy of selector (#page-name .content-block .sub-element .element).<p>* Use CSS modules (/css/widgets/user_list.css, /css/widgets/merchant.css).<p>* Use SASS or SCSS?<p>* Divide CSS by function (e.g. .left, .right) and module (e.g. .widget, .widget-calendar).<p>* Pick jQuery-UI/ExtJS/etc, study their CSS and follow their lead?<p>Can you recommend great articles, advice or guides?  As with programming, I know that there are a number of styles of coding for CSS; I just haven't seen them discussed as much as OO vs FP on HN and CSS seems pervasive, critical and, basically, randomly used.
======
ra
This was actually discussed quite recently:

<http://news.ycombinator.com/item?id=2376782>

~~~
CoffeeDregs
Nice. Not sure how I missed that.

