background preloader

Styleguides

Facebook Twitter

Sass Style Guide. With more people than ever writing in Sass, it bears some consideration how we format it.

Sass Style Guide

CSS style guides are common, so perhaps we can extend those to cover choices unique to Sass. Here are some ideas that I've been gravitating toward. Perhaps they are useful to you or help you formulate ideas of your own. Use Your Regular CSS Formatting Rules / Style Guide This post is about Sass-specific stuff, but as a base to this, you should follow a whatever good CSS formatting guidelines you are already following.

Google HTML/CSS Style Guide. Strictly keep structure (markup), presentation (styling), and behavior (scripting) apart, and try to keep the interaction between the three to an absolute minimum.

Google HTML/CSS Style Guide

That is, make sure documents and templates contain only HTML and HTML that is solely serving structural purposes. Move everything presentational into style sheets, and everything behavioral into scripts. In addition, keep the contact area as small as possible by linking as few style sheets and scripts as possible from documents and templates. CSS Style Guides. As we wrap up our recent poll on ordering CSS properties, it brings up the larger issue of CSS style guides.

CSS Style Guides

Ordering properties is just one choice you have to make that makes up a complete styling strategy. Naming is a part of it. Sectioning is a part of it.