Skip to main content

color-hex-alpha

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

¥Require or disallow alpha channel for hex colors.

a { color: #fffa }
/** ↑

* This alpha channel */

选项

¥Options

"always"

{
"color-hex-alpha": "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"

{
"color-hex-alpha": "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; }