csstools / stylelint-color-control

Control color usage in CSS
Creative Commons Zero v1.0 Universal
4 stars 2 forks source link

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.