Css Clean 1.1.1
MIT
License:All 18 tests pass
✅css-clean package
We all write code a little quickly sometimes. This is a package which offers a helping hand to sort, align and clean your CSS and SASS.
Configuration
example settings
cleanCss({
css : String
lineBreak : Number, // Optional
tabSize : 2, // Optional, default is 2
tabChar : ' ', // Optional, default is ' '
})
Sorting properties
Before
After
@media
queries
Clearly format your Before
{}
After
{}
Sort multiple selector names and automatic placement to one line per selector
Before
After
[
SASS
Grouping of variables which are pushed to the top of the file
Before
$);$@ } @ } } $
After
$);$@ } @ }}
Merging of multiple imports
Before
;;;
After
;
@each
statements easier to read
Make your Before
@), (), () -}
After
@), (), () -}
Gradients
Before
After
Feel free to contribute.
Tests
1. Background......................................................... ✅
2. basic test......................................................... ✅
3. acid test.......................................................... ✅
4. Block Comment...................................................... ✅
5. bug report......................................................... ✅
6. SASS Each (basic).................................................. ✅
7. SASS for........................................................... ✅
8. SASS function...................................................... ✅
9. SASS Import (basic)................................................ ✅
10. SASS @mixin........................................................ ✅
11. SASS nested (basic)................................................ ✅
12. SASS Placeholders (basic).......................................... ✅
13. SASS while......................................................... ✅
14. Sorted Selectors (basic)........................................... ✅
15. test 10............................................................ ✅
16. Nested multiple selectors.......................................... ✅
17. SASS @mixin (arguments)............................................ ✅
18. SASS Selector Eval (basic)......................................... ✅