Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D digitec-wiki
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Digitec
  • digitec-wiki
  • Wiki
  • css and sass coding standards

Last edited by Rene Cabral Mar 22, 2014
Page history
This is an old version of this page. You can view the most recent version or browse the history.

css and sass coding standards

CSS + Sass

All of the following standards and practices on this page describe both CSS and Sass, unless otherwise noted.

Structure

  • Use 4-space indents, not tabs
  • Add four blank lines between sections and one blank line between blocks in a section
  • Each selector should be on its own line, ending in either a comma or an opening curly brace
  • Property-value pairs can be on a single line, if there is only one pair for the selector, otherwise they should be on their own line
  • Optionally, sets of property-value pairs can align vertically on the : chracter
  • The closing brace should be left-aligned, using the same level of indentation as the opening selector

Wrong

.selector-1, .selector-2, .selector-3 {
    background: #fff;
    color: #000;
    }

.selector-1 { background: #fff; color: #000; }

Good

.selector-1,
.selector-2,
.selector-3 {
    background: #fff;
    color: #000;
}

Best

.selector-1,
.selector-2,
.selector-3 {
    background : #fff;
    color      : #000;
}
Clone repository
  • alpha beta testing
  • browser testing
  • camtasia licenses
  • code delivery processes
  • coding practices
  • css and sass coding standards
  • database schema standards
  • dependency management
  • development environments
  • digitec agile process
  • digitec gitlab styles
  • digitec software promises
  • digitec spec process
  • gitlab administration
  • gitlab issues tags
View All Pages