https://github.com/csstools/stylelint-color-control
Control color usage in CSS
https://github.com/csstools/stylelint-color-control
Last synced: 11 months ago
JSON representation
Control color usage in CSS
- Host: GitHub
- URL: https://github.com/csstools/stylelint-color-control
- Owner: csstools
- License: cc0-1.0
- Created: 2019-01-24T21:03:48.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-13T17:59:24.000Z (almost 7 years ago)
- Last Synced: 2024-04-14T02:27:35.849Z (almost 2 years ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 4
- Watchers: 6
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Stylelint Color Control [
][stylelint]
[![NPM Version][npm-img]][npm-url]
[![Build Status][cli-img]][cli-url]
[![Support Chat][git-img]][git-url]
[Stylelint Color Control] is a [stylelint] rule to control color usage in CSS.
## Usage
Add [stylelint] and [Stylelint Color Control] to your project.
```bash
npm install stylelint stylelint-color-control --save-dev
```
Add [Stylelint Color Control] to your [stylelint configuration].
```js
{
"plugins": [
"stylelint-color-control"
],
"rules": {
"csstools/stylelint-color-control": "always" || "never" || "ignore"
}
}
```
## Options
### always
If the first option is `"always"` or `true`, then [Stylelint Color Control] requires all
nodes to be linted, and the following patterns are _not_ considered violations:
```pcss
.example {}
```
While the following patterns are considered violations:
```pcss
.example {}
```
### never
If the first option is `"never"` or `false`, then [Stylelint Color Control] requires all
nodes to be linted, and the following patterns are _not_ considered
violations:
```pcss
.example {}
```
While the following patterns are considered violations:
```pcss
.example {}
```
### ignore
If the first option is `"ignore"` or `null`, then [Stylelint Color Control] does nothing.
[cli-img]: https://img.shields.io/travis/csstools/stylelint-color-control.svg
[cli-url]: https://travis-ci.org/csstools/stylelint-color-control
[git-img]: https://img.shields.io/badge/support-chat-blue.svg
[git-url]: https://gitter.im/stylelint/stylelint
[npm-img]: https://img.shields.io/npm/v/stylelint-color-control.svg
[npm-url]: https://www.npmjs.com/package/stylelint-color-control
[stylelint]: https://github.com/stylelint/stylelint
[stylelint configuration]: https://github.com/stylelint/stylelint/blob/master/docs/user-guide/configuration.md#readme
[Stylelint Color Control]: https://github.com/csstools/stylelint-color-control