stylelint-gamut 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,16 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
[![npm version][npm-version-img]][npm] [![npm downloads last month][npm-downloads-img]][npm]
|
|
4
4
|
|
|
5
|
-
**stylelint-gamut** is a [Stylelint] plugin that helps you to work with different color spaces.
|
|
5
|
+
**stylelint-gamut** is a [Stylelint] that plugin that helps you to work with different color spaces.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
# Rules
|
|
8
|
+
|
|
9
|
+
* [`color-no-out-gamut-range`](./src/README.md): Throw warning if color goes out of sRGB color space and is not wrapped in `@media (color-gamut: p3) {}`.
|
|
10
|
+
|
|
11
|
+
# Requirements
|
|
12
|
+
|
|
13
|
+
- **node version ≥ 16.0.0**
|
|
14
|
+
- **Stylelint version ≥ 14.0.0**.
|
|
8
15
|
|
|
9
16
|
# Installation
|
|
10
17
|
|
|
11
18
|
1. If you haven't, install [Stylelint]:
|
|
12
19
|
|
|
13
20
|
```
|
|
14
|
-
npm install stylelint --save-dev
|
|
21
|
+
npm install stylelint stylelint-config-standard --save-dev
|
|
15
22
|
```
|
|
16
23
|
|
|
17
24
|
2. Install `stylelint-gamut`:
|
|
@@ -20,7 +27,7 @@ npm install stylelint --save-dev
|
|
|
20
27
|
npm install stylelint-gamut --save-dev
|
|
21
28
|
```
|
|
22
29
|
|
|
23
|
-
|
|
30
|
+
# Usage
|
|
24
31
|
|
|
25
32
|
Add `stylelint-gamut` to your Stylelint config `plugins` array, then add rules you need to the rules list. All rules from `stylelint-gamut` need to be namespaced with `gamut`.
|
|
26
33
|
|
|
@@ -35,11 +42,16 @@ Add `stylelint-gamut` to your Stylelint config `plugins` array, then add rules y
|
|
|
35
42
|
}
|
|
36
43
|
```
|
|
37
44
|
|
|
38
|
-
|
|
45
|
+
# More
|
|
46
|
+
It is already used by the creator of [PostCSS] [Andrey Sitnik].
|
|
39
47
|
|
|
40
|
-
|
|
48
|
+
Read more about color spaces in css:
|
|
49
|
+
- [LCH colors in CSS: what, why, and how?](https://lea.verou.me/2020/04/lch-colors-in-css-what-why-and-how/)
|
|
50
|
+
- [A Guide To Modern CSS Colors](https://www.smashingmagazine.com/2021/11/guide-modern-css-colors/)
|
|
41
51
|
|
|
42
52
|
[Stylelint]: https://stylelint.io/
|
|
43
53
|
[npm-version-img]: https://img.shields.io/npm/v/stylelint-gamut.svg
|
|
44
54
|
[npm-downloads-img]: https://img.shields.io/npm/dm/stylelint-gamut.svg
|
|
45
55
|
[npm]: https://www.npmjs.com/package/stylelint-gamut
|
|
56
|
+
[PostCSS]: https://github.com/postcss/postcss
|
|
57
|
+
[Andrey Sitnik]: https://github.com/ai
|