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

Commit 4207347

Browse files
author
Marlow Payne
committed
Add CSSComb doc
1 parent 82f4509 commit 4207347

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

css/Readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,8 @@
4545
* [Sass-Lint](sass-lint/readme.md)
4646
* [Using Sass-Lint with Atom](sass-lint/readme.md#using-sass-lint-with-atom)
4747
* [Using Sass-Lint with Sublime Text](sass-lint/readme.md#using-sass-lint-with-sublime-text)
48+
* [CSSComb](csscomb/readme.md)
49+
* [Using CSSComb with Atom](csscomb/readme.md#atom)
50+
* [Using CSSComb with Sublime Text](csscomb/readme.md#sublime-text)
4851

4952
Continue on to [the Introduction →](introduction#introduction)

css/csscomb/readme.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# CSSComb
2+
3+
A [CSS-beautifier utility](http://csscomb.com/) which will correctly layout your written Sass according to our [code style](https://github.com/mobify/mobify-code-style/blob/develop/css/.csscomb.json).
4+
5+
## How to Install CSSComb
6+
7+
### Prerequisites
8+
* Install Node.js and NPM with NVM as directed in the [Adaptive.js docs](http://adaptivejs.mobify.com/v2.0/docs/install/)
9+
* Install CSSComb and the Mobify Code Style:
10+
11+
`npm install -g csscomb mobify-code-style`
12+
13+
### Atom
14+
1. Install [css-comb package](https://atom.io/packages/css-comb) for Atom (this will allow you to set the global CSSComb config)
15+
1. Open your Atom package settings for "css-comb" (**not** "csscomb")
16+
* 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
17+
* Ensure Disable config searching is unchecked
18+
1. Restart Atom
19+
1. Start combing your Sass!
20+
21+
### Sublime Text
22+
23+
Before you start, make sure you have [Package Control](https://packagecontrol.io/installation) installed for Sublime Text.
24+
25+
1. Install [CSSComb for Sublime](https://packagecontrol.io/packages/CSScomb) (Search for "CSScomb" in Sublime's Package Control)
26+
1. 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):
27+
28+
```bash
29+
cd ~
30+
ln -s /path/to/your/local/node_modules/mobify-code-style/css/.csscomb.json ./.csscomb.json
31+
```
32+
(Find your local path by running `npm config get prefix` and append `/lib/node_modules/mobify-code-style/css/.csscomb.json` to the result)
33+
1. Restart Sublime
34+
1. Start combing your Sass!

css/introduction/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ We follow a mixture of various methodologies include, but not limited to: SMACSS
1919
* [Spline](https://github.com/mobify/spline) is our library of Sass mixins and functions
2020
* [Stencil](https://github.com/mobify/stencil) (Deprecated – but a new 2.0 version is coming soon!) is our library or reusable UI patterns
2121
* [Sass-Lint](https://github.com/sasstools/sass-lint) is our preferred linter for `SCSS`. Our custom linting rules are found [here](https://github.com/mobify/mobify-code-style/blob/master/css/.sass-lint.yml)). Find out how to integrate Sass-Lint with your text editor [here](../sass-lint/readme.md).
22-
* [CSScomb](http://csscomb.com/) is a tool that can be plugged into most popular text editors that automatically formats your code! Our formatting ruleset can be found [here](https://github.com/mobify/mobify-code-style/blob/master/css/.csscomb.json)
22+
* [CSScomb](http://csscomb.com/) is a tool that can be plugged into most popular text editors that automatically formats your code! Our formatting ruleset can be found [here](https://github.com/mobify/mobify-code-style/blob/master/css/.csscomb.json). Find out how to integrate CSSComb with your text editor [here](../csscomb/readme.md).
2323

2424

2525
## Philosophy & Structure

0 commit comments

Comments
 (0)