WCAG Contrast
WCAG Contrast checks CSS for color contrast compliance with Web Content Accessibility Guidelines (WCAG) 2.0.
Usage
Add WCAG Contrast to your build tool:
npm install postcss-wcag-contrast --save-dev
Node
Use WCAG Contrast to process your CSS:
;
PostCSS
Add PostCSS to your build tool:
npm install postcss --save-dev
Use WCAG Contrast as a plugin:
;
Gulp
Add Gulp PostCSS to your build tool:
npm install gulp-postcss --save-dev
Use WCAG Contrast in your Gulpfile:
var postcss = ; gulp;
Grunt
Add Grunt PostCSS to your build tool:
npm install grunt-postcss --save-dev
Use WCAG Contrast in your Gruntfile:
grunt; grunt;
Options
compliance
Type: String
Default: "AA"
The compliance
option specifies the WCAG compliance the CSS will be evaluated
against.
wcag-params
Type: CSS Comment
The wcag-params
specifies additional font size, font weight, background, and
foreground information about the rule.