Skip to content

Files

Latest commit

 

History

History
57 lines (39 loc) · 711 Bytes

color-no-hex.md

File metadata and controls

57 lines (39 loc) · 711 Bytes

Pattern: Use of hex color

Issue: -

Description

Disallow hex colors.

Examples

The following patterns are considered violations:

a { color: #333 }
/**        ↑
 * These hex colors */
a { color: #000; }
a { color: #fff1aa; }
a { color: #123456aa; }

Hex values that are not valid also cause violations:

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

The following patterns are not considered violations:

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

Further Reading