1
0
mirror of https://github.com/thangisme/notes.git synced 2024-06-11 21:30:44 +00:00
notes/node_modules/stylelint/lib/rules/color-no-invalid-hex
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00
..
index.js Initial commit 2017-03-09 13:16:08 -05:00
README.md Initial commit 2017-03-09 13:16:08 -05:00

color-no-invalid-hex

Disallow invalid hex colors.

a { color: #y3 }
/**        ↑
 * These hex colors */

Longhand hex colors can be either 6 or 8 (with alpha channel) hexadecimal characters. And their shorthand variants are 3 and 4 characters respectively.

Options

true

The following patterns are considered warnings:

a { color: #00; }
a { color: #fff1az; }
a { color: #12345aa; }

The following patterns are not considered warnings:

a { color: #000; }
a { color: #000f; }
a { color: #fff1a0; }
a { color: #123450aa; }