All CSS is documented using KSS—specifically, the Node implantation. This creates a reliable way to build a style guide, and a consistent method of documenting CSS within the modules themselves.
The CSS is contained within the following partials, which is based on conventions from SMACSS.
- Base Base styles are stored here
- Layout Site-wide layout styles are stored here, like main containers
- Module The majority of the CSS is imported here. Modules make up the majority of the site and are contained within the
- Shame If you’re unsure what to do, or need to fix something quickly, store it here. Just make sure to document the reason and locations it is used thoroughly, so it can be tidied up later.
- Vendor Unmodified dependencies are stored here. For example, Bourbon and Normalize.css are stored here.
Once you have the project cloned locally, you can rebuild the style guide with the following commands:
npm install npm run styleguide harp server # Visit http://localhost:9000/styleguide