Skip to content

Commit cae308b

Browse files
authored
Merge pull request #32 from sparksuite/improve-readme
Improve the README
2 parents 880ec35 + f0a427c commit cae308b

1 file changed

Lines changed: 16 additions & 9 deletions

File tree

README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# W3C CSS Validator
2-
A modern package for validating CSS using [W3C's public CSS validator service](https://jigsaw.w3.org/css-validator/). It simplifies and standardizes the API that W3C exposes to follow newer and more JavaScript-specific conventions. The package is written entirely in TypeScript, is thoroughly tested, has zero dependencies, and uses an asynchronous design.
2+
A modern package for validating CSS using [W3C’s public CSS validator service](https://jigsaw.w3.org/css-validator/). It’s goal is to simplify and standardize the API that W3C exposes, so that it adheres to newer conventions and is intuitive and easy to use.
3+
4+
- 📦 Written entirely in TypeScript
5+
- 🔬 Thoroughly tested
6+
- ⚡️ Zero dependencies
7+
- 🤝 Promise-based design
8+
- ✨ Tiny size
9+
- 🌎 Works in Node.js and browsers
310

411
## Getting started
512

@@ -54,7 +61,7 @@ Option | Default | Possible values
5461
Option | Explanation
5562
:--- | :---
5663
`medium` | The equivalent of the `@media` rule, applied to all of the CSS
57-
`warningLevel` | `0` means don't return any warnings; `1`, `2`, `3` will return warnings (if any), with higher numbers corresponding to more warnings
64+
`warningLevel` | `0` means dont return any warnings; `1`, `2`, `3` will return warnings (if any), with higher numbers corresponding to more warnings
5865

5966
Example:
6067

@@ -85,24 +92,24 @@ If you ask it to return warnings via `warningLevel`, it will also include a `war
8592
{
8693
...
8794
warnings: {
88-
line: number;
89-
level: 1 | 2 | 3;
90-
message: string;
91-
}[];
95+
line: number;
96+
level: 1 | 2 | 3;
97+
message: string;
98+
}[];
9299
}
93100
```
94101

95102
## Errors vs. warnings
96103

97-
From W3C's [manual](https://jigsaw.w3.org/css-validator/manual.html):
104+
From W3Cs [manual](https://jigsaw.w3.org/css-validator/manual.html):
98105

99106
> The validator can give you two types of messages: errors and warnings. Errors are given when the checked CSS does not respect the CSS recommendation. Warnings are different from errors since they do not state a problem regarding the specification. They are here to warn that some points might be dangerous and could lead to a strange behavior on some user agents.
100107
101108
## Throttling
102109

103-
You should not call the validator more often than **1 req/sec**. From W3C's [manual](https://jigsaw.w3.org/css-validator/manual.html):
110+
You should not call the validator more often than **1 req/sec**. From W3Cs [manual](https://jigsaw.w3.org/css-validator/manual.html):
104111

105-
> If you wish to call the validator programmatically for a batch of documents, please make sure that your script will sleep for at least 1 second between requests. The CSS Validation service is a free, public service for all, your respect is appreciated. thanks.
112+
> If you wish to call the validator programmatically for a batch of documents, please make sure that your script will sleep for at least 1 second between requests. The CSS Validation service is a free, public service for all, your respect is appreciated.
106113
107114
## Local development
108115

0 commit comments

Comments
 (0)