Skip to content
miraksPublic

About

Sass properties sorting tool

Resources

Stars

9 stars

Watchers

3 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

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

About

Sass properties sorting tool

Resources

Stars

9 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages