sort-sass-smacss
v0.0.11
Published
Sass properties sorting tool
Downloads
12
Readme
SortSass
Sass properties sorting tool.
It supports only indented sass syntax.
Install
npm install -g sort-sass
Leave off the -g
if you don't wish to install globally.
Usage
From CLI:
sortsass /path/to/styles.sass
From node:
var fs = require('fs');
var sortSass = require('sort-sass');
var sassString = fs.readFileSync('some.sass');
var sortedSassString = sortSass(sassString);
Examples
Input:
.foo
font-size: 1em
content: 'bar'
color: white
display: block
position: absolute
Output:
.foo
content: 'bar'
display: block
position: absolute
font-size: 1em
color: white
Properties order
Ordering is hardcoded right now, you can see it here https://github.com/miraks/sort-sass/blob/master/src/order.coffee. I think I'll add an option to change this.
– miraks (repository owner) in a comment to #1
There is an issue #3
License
MIT © Alexey Volodkin