Skip to main content

color-hex-alpha

需要或禁止十六进制颜色的 Alpha 通道。

¥Require or disallow alpha channel for hex colors.

a { color: #fffa }
/** ↑

* This alpha channel */

message 次要选项 可以接受该规则的参数。

¥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; }