Search
Close this search box.
Search
Close this search box.

CSS Coding Standards

Document Head

Each main stylesheet should contain a document head.

The document head may contain a color reference. A color reference is an index of colors commonly used in the design. This reference makes it easy to identify specific color values without a color picker. It is also useful when a color is updated, since a quick find/replace can be completed.

A description, table of contents, or other meta data may be included in this head as deemed appropriate.
/************************************************************************************

    Color Reference:
        red: #EE2E24
        blue: #0000FF
        gray: #333333

*************************************************************************************/

Sections

CSS style blocks should be grouped by section and ordered according to the markup in the HTML document. Common sections include the following:
  • Global
  • Type
  • Forms
  • Header
  • Navigation
  • Content
  • Footer
Page- or layout-specific sections may be added. Sections should be denoted with comments which use the following format:
/* ************************************
 *
 * @Section: Global
 *
 ************************************* */