• if you start line with “.class-name” it assumes “div” by default • Classes begin with “.” and IDs with “#” • Use Rails helpers instead of straight Haml when available • “-” prefaces Ruby code to be executed • “=” prefaces Ruby code to be printed
a two space indent. • Put spaces after : in property declarations. • Put spaces before { in rule declarations in SCSS. • Line returns after the last property declaration to place the }. • Use hex color codes #000 and lowercase #fff unless using rgba.
you have a very good reason (you don't). • Don't qualify class selectors with tag names (speed and re-usability). • When writing CSS, remember that the fewer selectors used, the faster the CSS. #hermes a // this would override .a-link ALWAYS because of specificity -- causing a maintainer to need overly specific selectors later a.a-link { text-transform: uppercase; } .container a.a-link { // Why so specific? font-weight bold; } .a-link { font-weight bold; }