- use markdown syntax in comments - can be parsed for style guide generation
/**
* # Short description
* ---
*
* * Long description (optional)
| <form action="#"> | |
| <fieldset> | |
| <legend>Form title</legend> | |
| <ol> | |
| <li> | |
| <label>Name | |
| <input type="text" /></label><!-- implicit association --> | |
| </li> | |
| <li> | |
| <label>Email</label><!-- explicit association --> |
| // ------------------------------------------ | |
| // modularise | |
| // use doc blocks | |
| // use inline commenting | |
| // minify | |
| // use BEM syntax | |
| // aim to lock down UI layer | |
| // ------------------------------------------ | |
| application.scss // manifest file; minified source |
| $ie8: false !default; | |
| $ie9: false !default; | |
| $lt-ie9: $ie7 or $ie8; | |
| // Compass cross-browser support configuration | |
| // http://compass-style.org/reference/compass/support/ | |
| $legacy-support-for-ie6: false; | |
| $legacy-support-for-ie7: $ie7; | |
| $legacy-support-for-ie8: $ie8; |
| source "https://rubygems.org" | |
| #gem "zurb-foundation", :git => "git@github.com:zurb/foundation.git", :branch => '4.2' || | |
| gem "zurb-foundation", "=4.1.2" | |
| gem "compass" |
New Compass Project
compass create new-project --require "zurb-foundation" --using foundation
Clone Foundation for reference
git clone git@me:zurb/foundation.git temp-framework
Add Project Folder to Chrome Dev Tools "Sources" Tab for fast Web Inspector Development.
Web Inspector > Workspace > Folders
| #nav { | |
| @include sliding-nav($nav-item-index:8); // note - set only one SASS parameter by using named variables syntax | |
| .top-bar { | |
| // .. | |
| } | |
| } |
| // import third party CSS | |
| // ignored by sass compiler | |
| @import url("http://yui.yahooapis.com/pure/0.2.1/pure-min.css"); | |
| // CSS import with media queries | |
| // ignored by sass compiler | |
| @import url('landscape.css') screen and (orientation:landscape); |
| // ---------------- Basic ---------------- | |
| @import "compass/utilities/sprites"; | |
| $icon-spacing: 1px; // $<folder>-spacing; distance separating each image | |
| $icon-sprite-dimensions: true; // include the dimensions of each sprite | |
| @import "icon/*.png"; // img dir location is defined inside config,rb | |
| @include all-icon-sprites; // all-<folder>-sprites; | |