hue-degree-notation
Specify number or angle notation for degree hues.
a { color: hsl(198deg 28% 50%) }/** ↑ * This notation */Use this rule to enforce a convention. A hue can be an angle or a number, which is interpreted as degrees.
Choose:
"angle"for clarity"number"for brevity
The fix option can automatically fix all of the problems reported by this rule.
This rule supports 2 message arguments: the hue and its expected notation.
Options
Section titled “Options”"angle"
Section titled “"angle"”Degree hues must always use angle notation.
{ "hue-degree-notation": "angle"}The following patterns are considered problems:
a { color: hsl(198 28% 50%) }a { color: lch(56.29% 19.86 10 / 15%) }The following patterns are not considered problems:
a { color: hsl(198deg 28% 50%) }a { color: lch(56.29% 19.86 10deg / 15%) }"number"
Section titled “"number"”Degree hues must always use the number notation.
{ "hue-degree-notation": "number"}The following patterns are considered problems:
a { color: hsl(198deg 28% 50%) }a { color: lch(56.29% 19.86 10deg / 15%) }The following patterns are not considered problems:
a { color: hsl(198 28% 50%) }a { color: lch(56.29% 19.86 10 / 15%) }