Skip to content

Latest commit

 

History

History
 
 

color-no-hex

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

color-no-hex

Disallow hex colors.

a { color: #333 }
/**        ↑
 * This hex color */

The message secondary option can accept the arguments of this rule.

Options

true

The following patterns are considered problems:

a { color: #000; }
a { color: #fff1aa; }
a { color: #123456aa; }

Hex values that are not valid also cause problems:

a { color: #foobar; }
a { color: #0000000000000000; }

The following patterns are not considered problems:

a { color: black; }
a { color: rgb(0, 0, 0); }
a { color: rgba(0, 0, 0, 1); }