forked from ehmicky/Notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcsscomb.node_cli.txt
More file actions
129 lines (101 loc) · 6.83 KB
/
csscomb.node_cli.txt
File metadata and controls
129 lines (101 loc) · 6.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
┏━━━━━━━━━━━━━┓
┃ CSSCOMB ┃
┗━━━━━━━━━━━━━┛
ALTERNATIVES ==> #Generic:
# - csscomb (prefered): best code quality
# - prettier: well maintained and good quality but very opinionated
# - stylefmt: more maintained, has stylelint support but not enough features yet
# - perfectionist: not maintained, less features
#Specific:
# - beautifying PROP order, better than generic for that purpose:
# - postcss-sorting (prefered): almost same as csscomb, but add support for nested rule sorting
# - css-declaration-sorter: allow predefined orders like "concentric CSS"
VERSION ==> #3.1.7
#CSS beautifier
CONF ==> #Can be set:
# - OBJ|STR:
# - using:
# - [../.../].csscomb.json
# - csscomb --config FILE.json|STR
# - new CSSCOMB(OBJ|STR)
# - COMB.configure(OBJ|STR)
# - STR is one of predefined configs (can be overriden by OBJ):
# - 'csscomb': default
# - 'yandex': only 'Yandex' sort order
# - 'zen': only 'Zen' sort order
# - FILE.css|'CSS':
# - find out coding style from looking at CSS
# - using:
# - csscomb --detect
# - COMB.detectInFile('FILE.css'[, OBJ])->CONF
# - OBJ are options to detect (def: all)
# - COMB.detectInString('CSS'[, OBJ])->CONF
# - CONF.template 'FILE.css'
#Can be get:
# - CSSCOMB.getConfig(STR)->CONF: for predefined configs
CONF.FEATURE #VAL. See below for list
CONF.exclude #'GLOB'_ARR
csscomb DIR|FILE... #As CLI
--verbose #Can also use CONF.verbose BOOL
new CSSCOMB([CONF])->COMB #As Node module
COMB.processString('CSS') #
COMB.processPath('FILE.css'|'DIR')#
COMB.processFile('FILE.css') #
COMB.processDirectory('DIR') #
┌────────────┐
│ ERRORS │
└────────────┘
remove-empty-rulesets #BOOL. No empty block
┌─────────────┐
│ NEWLINE │
└─────────────┘
eof-newline #BOOL. Newline at end of line
space-between-declarations #NUM (number of spaces) or STR (e.g. '\n'). Whitespace after ;
always-semicolon #BOOL. ; for the last rule of the rulset, unless it is a {...} mixin block
┌──────────────────┐
│ INDENT/WIDTH │
└──────────────────┘
tab-size #Non-nested rules indentation: NUM (number of spaces) or undefined (tabs)
block-indent #Nested rules indentation: NUM (number of spaces) or STR
┌───────────┐
│ SPACE │
└───────────┘
strip-spaces #BOOL. No trailing whitespaces
space-after|before-
selector-delimiter #NUM|STR. Space before , in selectors
space-after|before-combinator #NUM|STR. Space after|before > + ~
space-after|before-opening-brace #NUM|STR. Space after|before {
space-before-closing-brace #NUM|STR. Space before }
space-after|before-colon #NUM|STR. Spaces after|before :
vendor-prefix-align #BOOL. Vertical align vendor prefixes
┌───────────────┐
│ SELECTORS │
└───────────────┘
element-case #TAG selectors case: 'lower|upper'
┌───────────┐
│ PROPS │
└───────────┘
sort-order #PROPS order.
#Can be:
# - ARR2_ARR:
# - ARR: groups, two-newline separated
# - ARR2: props, where VAL can be:
# - 'PROP'
# - '...':
# - any PROP not specified (def: at end)
# - if CONF.sort-order-fallback 'abc', are ordered alphabetically
# - '$variable': $var|@var
# - '$include': @include|extend(), .MIXIN()
# - '$import': @import
# - ARR: same as [ ARR ]
┌────────────┐
│ VALUES │
└────────────┘
color-case #COLOR case: 'lower|upper'
color-shorthand #BOOL. COLO as short|long (true|false) as possible
unitless-zero #BOOL. Unitless 0, for LEN
leading-zero #BOOL. 0.5 or .5
┌────────────┐
│ QUOTES │
└────────────┘
quotes #Quotes: 'single|double'