Skip to content

Commit e0e85a5

Browse files
author
chaals
committed
english editing
quick check of english grammar etc.
1 parent e02764b commit e0e85a5

File tree

1 file changed

+31
-32
lines changed

1 file changed

+31
-32
lines changed

README.md

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,37 @@
44
CSSComb is a coding style formatter for CSS.
55
You can easily write your own [configuration](#configuration) to make your style sheets beautiful and consistent.
66

7-
The main feature is the [sorting properties](#sort-order) in specific order.
8-
It was inspired by the same-named [@miripiruni](https://github.com/miripiruni)'s [PHP-based tool](https://github.com/csscomb/csscomb).
9-
This is the new JavaScript version, based on powerful CSS parser [Gonzales PE](https://github.com/tonyganch/gonzales-pe).
7+
The main feature is [sorting properties](#sort-order) in a specific order.
8+
It was inspired by [@miripiruni](https://github.com/miripiruni)'s [PHP-based tool](https://github.com/csscomb/csscomb) of the same name.
9+
This is the new JavaScript version, based on the powerful CSS parser [Gonzales PE](https://github.com/tonyganch/gonzales-pe).
1010

1111
## Installation
1212

13-
Global installation (use as a command-line tool):
13+
Global installation (for use as a command-line tool):
1414

1515
```bash
1616
npm install csscomb -g
1717
```
1818

19-
Local installation (use as a command-line tool within current directory):
19+
Local installation (for use as a command-line tool within current directory):
2020

2121
```bash
2222
npm install csscomb
2323
```
2424

25-
To install as a project dependency (package will appear in your dependencies):
25+
To install as a project dependency (the package will appear in your dependencies):
2626

2727
```bash
2828
npm install csscomb --save
2929
```
3030

31-
To install as a dev dependency (package will appear in your devDependencies):
31+
To install as a dev dependency (the package will appear in your devDependencies):
3232

3333
```bash
3434
npm install csscomb --save-dev
3535
```
3636

37-
## CLI usage
37+
## Command Line usage
3838

3939
To run `csscomb`:
4040

@@ -84,7 +84,7 @@ comb.processPath('style.css');
8484
8585
### configure(config)
8686
87-
You must configure csscomb before using and config must be a valid JSON.
87+
You must configure csscomb before use. The config must be valid JSON.
8888
See [configuration section](#configuration) for more information.
8989
9090
### processPath(path)
@@ -122,9 +122,8 @@ comb.processFile('print.less');
122122
### processString(text, syntax, filename)
123123
124124
Comb a stylesheet.
125-
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.
128127
129128
```js
130129
// Comb a css string:
@@ -140,7 +139,7 @@ var combedLESS = comb.processString(less, 'less');
140139
141140
### Through `.csscomb.json`
142141
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.
144143
145144
Example configuration:
146145
```json
@@ -166,14 +165,14 @@ Example configuration:
166165
}
167166
```
168167
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)
170169
```bash
171170
cp ./node_modules/csscomb/config/csscomb.json .csscomb.json
172171
```
173172
174173
### Through `.css`-template
175174
176-
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.
177176
178177
To provide a template just add `"template"` with the path to the template in the `.csscomb.json`:
179178
@@ -183,7 +182,7 @@ To provide a template just add `"template"` with the path to the template in the
183182
}
184183
```
185184
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"`:
187186
188187
```json
189188
{
@@ -193,11 +192,11 @@ CSSComb.js would detect only those things that could be detected, so if your tem
193192
}
194193
```
195194
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`.
197196
198197
### Creating `.csscomb.json` from the `.css` file
199198
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`:
201200
202201
```css
203202
.foo
@@ -206,13 +205,13 @@ If you want to configure everything manually, but based on the codestyle from ex
206205
}
207206
```
208207
209-
then by running
208+
running
210209
211210
```bash
212211
csscomb -d template.css > .csscomb.json
213212
```
214213
215-
you would generate this `.csscomb.json`:
214+
would generate this `.csscomb.json`:
216215
217216
```json
218217
{
@@ -265,13 +264,13 @@ csscomb -v ./test
265264
266265
### template
267266
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).
269268
270269
Available value: `{String}` path to the `.css` file.
271270
272271
Example: `{ "template": "example.css" }`
273272
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`:
275274
```bash
276275
csscomb --config example.css ./test
277276
csscomb -c example.css ./test
@@ -376,7 +375,7 @@ a { color: red
376375
377376
### colon-space
378377
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:
380379
* `{Number}` of spaces;
381380
* `{String}` of whitespaces or tabs. If there is any other character in the
382381
string, the value will not be set.
@@ -435,7 +434,7 @@ b { color: #fc0 }
435434
436435
### combinator-space
437436
438-
Acceptable value is `{Array}` with 2 elements of following types:
437+
Acceptable value is `{Array}` with 2 elements of the following types:
439438
* `{Number}` of spaces;
440439
* `{String}` of whitespaces, tabs or new lines. If there is any other
441440
character in the string, the value will not be set.
@@ -467,7 +466,7 @@ a > b { color: red }
467466
468467
### element-case
469468
470-
Available values: `{String}` `lower` or `upper`
469+
Acceptable values: `{String}` `lower` or `upper`
471470
472471
Example: `{ "element-case": "upper" }`
473472
@@ -481,7 +480,7 @@ LI > A { color: red }
481480
482481
### eof-newline
483482
484-
Available values: `{Boolean}` `true` or `false`
483+
Acceptable values: `{Boolean}` `true` or `false`
485484
486485
Example: `{ "eof-newline": true }`
487486
@@ -493,7 +492,7 @@ Example: `{ "eof-newline": false }`
493492
494493
### leading-zero
495494
496-
Available values: `{Boolean}` `true` or `false`
495+
Acceptable values: `{Boolean}` `true` or `false`
497496
498497
Example: `{ "leading-zero": false }`
499498
@@ -507,7 +506,7 @@ p { padding: .5em }
507506
508507
### quotes
509508
510-
Available values: `{String}` `single` or `double`
509+
Acceptable values: `{String}` `single` or `double`
511510
512511
Example: `{ "quotes": "single" }`
513512
@@ -521,7 +520,7 @@ p[href^='https://']:before { content: 'secure' }
521520
522521
### remove-empty-rulesets
523522
524-
Available values: `{Boolean}` `true`
523+
Acceptable values: `{Boolean}` `true`
525524
526525
Example: `{ "remove-empty-rulesets": true }` - remove rulesets that have no declarations or comments.
527526
@@ -666,7 +665,7 @@ a { color:red }
666665
667666
### strip-spaces
668667
669-
Available value: `{Boolean}` `true`
668+
Acceptable value: `{Boolean}` `true`
670669
671670
Example: `{ "strip-spaces": true }`
672671
@@ -676,7 +675,7 @@ Example: `{ "strip-spaces": true }`
676675
677676
### unitless-zero
678677
679-
Available value: `{Boolean}` `true`
678+
Acceptable value: `{Boolean}` `true`
680679
681680
Example: `{ "unitless-zero": true }`
682681
@@ -690,7 +689,7 @@ img { border: 0 }
690689
691690
### vendor-prefix-align
692691
693-
Available value: `{Boolean}` `true`
692+
Acceptable value: `{Boolean}` `true`
694693
695694
Example: `{ "vendor-prefix-align": true }`
696695

0 commit comments

Comments
 (0)