This document is a collection of enterprise standards and best practices regarding CSS and styling. The purpose of this document is to be a single source of truth for consistent CSS/SCSS across the enterprise, as well as a reference point that developers may use to find information. The goal is to provide a set of standards to help create a CSS/SCSS document that is easy to read and easy to maintain.
This is a living document, and as such should be amended as real-life examples are discovered and addressed.
- Avoid using multiple stylesheets.
- CSS should be delivered to a page or site in a single, minified css file, linked in the head of the document.
- The CSS file should be cacheable, for a one time http request cost, rather than served as content and downloaded repeatedly.
- Avoid using '!important' to override styles.