Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Latest commit

 

History

History
43 lines (31 loc) · 2.24 KB

readme.md

File metadata and controls

43 lines (31 loc) · 2.24 KB

CSSComb

A CSS-beautifier utility which will ensure that your SCSS is consistent with our code style.

CSSComb in action

How to Install CSSComb

Prerequisites

  • Install Node.js and NPM with NVM as directed in the Adaptive.js docs

  • Install CSSComb and the Mobify Code Style:

    npm install -g csscomb mobify-code-style

Atom

  1. Install css-comb package for Atom (this will allow you to set the global CSSComb config)
  2. Open your Atom package settings for "css-comb" (not "csscomb")
  • Ensure your custom config path is set to your machine's version of mobify-code-style: Run npm config get prefix and append /lib/node_modules/mobify-code-style/css/.csscomb.json to the result
  • Ensure Disable config searching is unchecked
  1. Restart Atom
  2. Start combing your Sass!

Sublime Text

Before you start, make sure you have Package Control installed for Sublime Text.

  1. Install CSSComb for Sublime (Search for "CSScomb" in Sublime's Package Control)
  2. CSSComb for Sublime will look for your config in your HOME directory, so make a symlink to the Mobify Code Style version (this way, updating the code style through NPM will automagically update the config for Sublime):
cd ~
ln -s /path/to/your/local/node_modules/mobify-code-style/css/.csscomb.json ./.csscomb.json

(Find your local path by running npm config get prefix and append /lib/node_modules/mobify-code-style/css/.csscomb.json to the result)

  1. Restart Sublime
  2. Start combing your Sass!

Other Text Editors