@@ -149,16 +149,16 @@ Example configuration:
149149 " verbose" : true,
150150
151151 " always-semicolon" : true,
152- " block-indent" : true ,
153- " colon-space" : true ,
152+ " block-indent" : " " ,
153+ " colon-space" : [ " " , " " ] ,
154154 " color-case" : " lower" ,
155155 " color-shorthand" : true,
156156 " element-case" : " lower" ,
157157 " eof-newline" : true,
158158 " leading-zero" : false,
159159 " remove-empty-rulesets" : true,
160- " rule-indent" : true ,
161- " stick-brace" : true ,
160+ " rule-indent" : " " ,
161+ " stick-brace" : " \n " ,
162162 " strip-spaces" : true,
163163 " unitless-zero" : true,
164164 " vendor-prefix-align" : true
@@ -330,10 +330,10 @@ div {
330330
331331** Note** : better to use with [rule-indent](# rule-indent)
332332
333- Available values:
334- * ` {Boolean }` ` true ` (means 4 spaces)
335- * ` {Number }` of spaces
336- * ` {String} ` of whitespace characters ( ` /[ \t ]+/ ` )
333+ Acceptable values:
334+ * ` {Number }` of spaces;
335+ * ` {String }` of whitespaces or tabs. If there is any other character in the
336+ string, the value will not be set.
337337
338338Example: ` { " block-indent" : 2 }`
339339
@@ -351,59 +351,54 @@ a { color: red
351351}
352352` ` `
353353
354- # ## colon-space
355-
356- Available values:
357- * ` {Boolean}` ` true` (means ` after` ) or ` false` (no whitespace at all)
358- * ` {String}` : ` before` , ` after` , ` both` or any combination of whitespaces
359- and/or a colon (` ` , ` : ` , ` \t :\n\t ` etc.)
360- * ` {Array}` with two ` {String}` values: for setting left and right whitespace around a colon
361-
362- Example: ` { " colon-space" : true }`
354+ Example: ` { " block-indent" : " " }`
363355
364356` ` ` css
365357/* before * /
366- a { color:red }
358+ a { color: red }
359+ @media all { a { color: green } }
367360
368361/* after * /
369- a { color: red }
362+ a { color: red
363+ }
364+ @media all {
365+ a { color: green
366+ }
367+ }
370368` ` `
371369
372- Example: ` { " colon-space" : " :\n\t\t" }`
373370
374- ` ` ` css
375- /* before * /
376- a {
377- color: red;
378- }
371+ # ## colon-space
379372
380- /* after * /
381- a {
382- color:
383- red;
384- }
385- ` ` `
373+ Acceptable value is ` {Array}` with 2 elements of following types:
374+ * ` {Number}` of spaces;
375+ * ` {String}` of whitespaces or tabs. If there is any other character in the
376+ string, the value will not be set.
386377
387- Example: ` { " colon-space" : " " }`
378+ The first element of the array sets spaces before colon, and the second one sets
379+ spaces after colon.
380+
381+ Example: ` { " colon-space" : [" \t" , " \t" ] }`
388382
389383` ` ` css
390384/* before * /
391385a { color: red }
392386
393387/* after * /
394- a { color: red }
388+ a { color : red }
395389` ` `
396390
397- Example: ` { " colon-space" : [" \t " , " \t " ] }`
391+ Example: ` { " colon-space" : [0, 1 ] }`
398392
399393` ` ` css
400394/* before * /
401- a { color: red }
395+ a { color:red }
402396
403397/* after * /
404- a { color : red }
398+ a { color: red }
405399` ` `
406400
401+
407402# ## color-case
408403
409404Available values: ` {String}` ` lower` or ` upper`
@@ -434,42 +429,36 @@ b { color: #fc0 }
434429
435430# ## combinator-space
436431
437- Available values:
438- * ` {Boolean}` : ` true` sets one space, ` false` removes the spaces.
439- * ` {String}` : any combination of whitespaces.
440- * ` {Array}` with two ` {String}` values: for setting left and right whitespace.
441-
442- Example: ` { " combinator-space" : true }`
443-
444- ` ` ` css
445- /* before * /
446- a> b { color: red }
432+ Acceptable value is ` {Array}` with 2 elements of following types:
433+ * ` {Number}` of spaces;
434+ * ` {String}` of whitespaces, tabs or new lines. If there is any other
435+ character in the string, the value will not be set.
447436
448- /* after * /
449- a > b { color: red }
450- ` ` `
437+ The first element of the array sets spaces before combinator, and the second
438+ one sets spaces after combinator.
451439
452- Example: ` { " combinator-space" : " " }`
440+ Example: ` { " combinator-space" : [ " " , " \n " ] }`
453441
454442` ` ` css
455443/* before * /
456- a > b { color: red }
444+ a> b { color: red }
457445
458446/* after * /
459- a> b { color: red }
447+ a >
448+ b { color: red }
460449` ` `
461450
462- Example: ` { " combinator-space" : [" " , " \n " ] }`
451+ Example: ` { " combinator-space" : [1, 1 ] }`
463452
464453` ` ` css
465454/* before * /
466455a> b { color: red }
467456
468457/* after * /
469- a >
470- b { color: red }
458+ a > b { color: red }
471459` ` `
472460
461+
473462# ## element-case
474463
475464Available values: ` {String}` ` lower` or ` upper`
@@ -522,10 +511,10 @@ Example: `{ "remove-empty-rulesets": true }` - remove rulesets that have no decl
522511
523512** Note** : better to use with [block-indent](# block-indent)
524513
525- Available values:
526- * ` {Boolean }` ` true ` (means 4 spaces)
527- * ` {Number }` of spaces
528- * ` {String} ` of whitespace characters ( ` /[ \t ]+/ ` )
514+ Acceptable values:
515+ * ` {Number }` of spaces;
516+ * ` {String }` of whitespaces or tabs. If there is any other character in the
517+ string, the value will not be set.
529518
530519Example: ` { " rule-indent" : 2 }`
531520
539528 margin:0 }
540529` ` `
541530
531+ Example: ` { " rule-indent" : " " }`
532+
533+ ` ` ` css
534+ /* before * /
535+ a { color:red; margin:0 }
536+
537+ /* after * /
538+ a {
539+ color:red;
540+ margin:0 }
541+ ` ` `
542+
543+
542544# ## sort-order
543545
544546** Note** : you can use an example of [.csscomb.json](https://github.com/csscomb/csscomb.js/blob/master/.csscomb.json) to set your own sort order
@@ -615,10 +617,10 @@ p {
615617
616618# ## stick-brace
617619
618- Available values:
619- * ` {Boolean }` ` true ` (means 1 space)
620- * ` {Number }` of spaces
621- * ` {String} ` of whitespace characters ( ` /[ \t\n ]+/ ` )
620+ Acceptable values:
621+ * ` {Number }` of spaces ;
622+ * ` {String }` of whitespaces, tabs or newlines. If there is any other
623+ character in the string, the value will not be set.
622624
623625Example: ` { " stick-brace" : " \n" }`
624626
631633{ color:red }
632634` ` `
633635
636+ Example: ` { " stick-brace" : 1 }`
637+
638+ ` ` ` css
639+ /* before * /
640+ a{ color:red }
641+
642+ /* after * /
643+ a { color:red }
644+ ` ` `
645+
646+
634647# ## strip-spaces
635648
636649Available value: ` {Boolean}` ` true`
0 commit comments