Skip to content
Control color usage in CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.editorconfig
.gitignore
.rollup.js
.tape.js
.travis.yml
CHANGELOG.md
CONTRIBUTING.md
LICENSE.md
README.md
package.json

README.md

Stylelint Color Control stylelint

NPM Version Build Status Support Chat

Stylelint Color Control is a stylelint rule to control color usage in CSS.

Usage

Add stylelint and Stylelint Color Control to your project.

npm install stylelint stylelint-color-control --save-dev

Add Stylelint Color Control to your stylelint configuration.

{
  "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:

.example {}

While the following patterns are considered violations:

.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:

.example {}

While the following patterns are considered violations:

.example {}

ignore

If the first option is "ignore" or null, then Stylelint Color Control does nothing.

You can’t perform that action at this time.