You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If style's syntax is different from `css`, you should pass `syntax` parameter,
126
-
too.
127
-
`filename` is optional, it's used to print possible errors.
125
+
If syntax is not `css`, you should pass a `syntax` parameter, too.
126
+
`filename` is optional. It is used to print errors.
128
127
129
128
```js
130
129
// Comb a css string:
@@ -140,7 +139,7 @@ var combedLESS = comb.processString(less, 'less');
140
139
141
140
### Through `.csscomb.json`
142
141
143
-
`csscomb` is configured using [.csscomb.json](https://github.com/csscomb/csscomb.js/blob/master/config/csscomb.json) file, located in the project root.
142
+
`csscomb` is configured using the file [.csscomb.json](https://github.com/csscomb/csscomb.js/blob/master/config/csscomb.json), located in the project root.
144
143
145
144
Example configuration:
146
145
```json
@@ -166,14 +165,14 @@ Example configuration:
166
165
}
167
166
```
168
167
169
-
**Note**: you can use one of [predefined config files](https://github.com/csscomb/csscomb.js/tree/master/config)
168
+
**Note**: you can also use a [predefined config file](https://github.com/csscomb/csscomb.js/tree/master/config)
Instead of configuring all the options one by one, you can use a CSS-template file: CSSComb.js would detect the codestyle used in this file and would use it as a config. All the existent properties except for the `sort-order`could be configured this way.
175
+
Instead of configuring all the options one by one, you can use a CSS-template file: CSSComb.js will detect the coding style and use it as a config. All existing properties except `sort-order`can be configured this way.
177
176
178
177
To provide a template just add `"template"` with the path to the template in the `.csscomb.json`:
179
178
@@ -183,7 +182,7 @@ To provide a template just add `"template"` with the path to the template in the
183
182
}
184
183
```
185
184
186
-
CSSComb.js would detect only those things that could be detected, so if your template don't provide examples of usage for some of the options, or if you would want to override something from it, you can write them in the `.csscomb.json` along the `"template"`:
185
+
CSSComb.js will only create rules based on the examples given, so if your template doesn't provide examples of usage for some of the options, or if you want to override an example, you can write them in the `.csscomb.json` after the `"template"`:
187
186
188
187
```json
189
188
{
@@ -193,11 +192,11 @@ CSSComb.js would detect only those things that could be detected, so if your tem
193
192
}
194
193
```
195
194
196
-
This config would detect all the options from the `example.css`, then it would use `"leading-zero": false` instead of what it detected, and then it would use `"vendor-prefix-align": true` even if there were no prefixed properties or values inside the `example.css`.
195
+
This config would detect all the options from the `example.css`, and use `"leading-zero": false` instead of anything detected, and `"vendor-prefix-align": true` even if there were no prefixed properties or values inside the `example.css`.
197
196
198
197
### Creating `.csscomb.json` from the `.css` file
199
198
200
-
If you want to configure everything manually, but based on the codestyle from existing `.css`-file, you can at first detect all the options using `--detect` CLI option, and then add/edit any options you like. So if you have such `example.css`:
199
+
If you want to configure everything manually, but based on the coding style of an existing `.css`-file, you can first detect all the options using `--detect` CLI option, and then add/edit any options you like. So if you have `example.css`:
201
200
202
201
```css
203
202
.foo
@@ -206,13 +205,13 @@ If you want to configure everything manually, but based on the codestyle from ex
206
205
}
207
206
```
208
207
209
-
then by running
208
+
running
210
209
211
210
```bash
212
211
csscomb -d template.css > .csscomb.json
213
212
```
214
213
215
-
you would generate this `.csscomb.json`:
214
+
would generate this `.csscomb.json`:
216
215
217
216
```json
218
217
{
@@ -265,13 +264,13 @@ csscomb -v ./test
265
264
266
265
### template
267
266
268
-
**Note:** see the description of the [configuring through template](#through-css-template).
267
+
**Note:** see the description of the [configuring with templates](#through-css-template).
269
268
270
269
Available value: `{String}` path to the `.css` file.
271
270
272
271
Example: `{ "template": "example.css" }`
273
272
274
-
CLI mode — just provide path to `.css` file instead of `.csscomb.json`:
273
+
CLI mode — just provide the path to the `.css` file instead of `.csscomb.json`:
275
274
```bash
276
275
csscomb --config example.css ./test
277
276
csscomb -c example.css ./test
@@ -376,7 +375,7 @@ a { color: red
376
375
377
376
### colon-space
378
377
379
-
Acceptable value is `{Array}` with 2 elements of following types:
378
+
Acceptable values are of the form `{Array}` with 2 elements of the following types:
380
379
*`{Number}` of spaces;
381
380
*`{String}` of whitespaces or tabs. If there is any other character in the
382
381
string, the value will not be set.
@@ -435,7 +434,7 @@ b { color: #fc0 }
435
434
436
435
### combinator-space
437
436
438
-
Acceptable value is `{Array}` with 2 elements of following types:
437
+
Acceptable value is `{Array}` with 2 elements of the following types:
439
438
*`{Number}` of spaces;
440
439
*`{String}` of whitespaces, tabs or new lines. If there is any other
441
440
character in the string, the value will not be set.
0 commit comments