跳到主要内容

color-hex-alpha

Require or disallow alpha channel for hex colors.

a { color: #fffa }
/** ↑
* This alpha channel */

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

Options

string: "always"|"never"

"always"

The following patterns are considered problems:

a { color: #fff; }
a { color: #ffffff; }

The following patterns are not considered problems:

a { color: #fffa; }
a { color: #ffffffaa; }

"never"

The following patterns are considered problems:

a { color: #fffa; }
a { color: #ffffffaa; }

The following patterns are not considered problems:

a { color: #fff; }
a { color: #ffffff; }