Skip to content

Latest commit

 

History

History
91 lines (71 loc) · 1.58 KB

function-color-relative.md

File metadata and controls

91 lines (71 loc) · 1.58 KB

Pattern: Missing use of scale-color

Issue: -

Description

Encourage the use of the scale-color over:

p {
   color: saturate(blue, 20%);
  /**     ↑      ↑
   * This function should be scalar-color
   */
}

Examples

true

The following patterns are considered violations:

p {
   color: saturate(blue, 20%);
}
p {
   color: desaturate(blue, 20%);
}
p {
   color: darken(blue, .2);
}
p {
   color: lighten(blue, .2);
}
p {
   color: opacify(blue, .2);
}
p {
   color: fade-in(blue, .2);
}
p {
   color: transparentize(blue, .2);
}
p {
   color: fade-out(blue, .2);
}

The following patterns are not considered violations:

 p {
   color: scale-color(blue, $alpha: -40%);
 }

Further Reading