Skip to content

Files

Latest commit

 

History

History
71 lines (48 loc) · 1.13 KB

alpha-value-notation.md

File metadata and controls

71 lines (48 loc) · 1.13 KB

Pattern: Missing percentage/number notation for alpha-value

Issue: -

Description

Specify percentage or number notation for alpha-values.

Examples

string: "number"|"percentage"

"number"

Alpha-values must always use the number notation.

The following patterns are considered violations:

a { opacity: 50% }
a { color: rgb(0 0 0 / 50%) }

The following patterns are not considered violations:

a { opacity: 0.5 }
a { color: rgb(0 0 0 / 0.5) }

"percentage"

Alpha-values must always use percentage notation.

The following patterns are considered violations:

a { opacity: 0.5 }
a { color: rgb(0 0 0 / 0.5) }

The following patterns are not considered violations:

a { opacity: 50% }
a { color: rgb(0 0 0 / 50%) }

Further Reading