Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 754 Bytes

declaration-strict-value.md

File metadata and controls

42 lines (27 loc) · 754 Bytes

Pattern: Malformed property value

Issue: -

Description

This rules enforces either variables ($sass, @less, var(--cssnext)), functions or custom CSS keywords (inherit, none, etc.) for property's values.

Example of incorrect code:

a { color: #FFF; }

a { color: inherit; }

a { color: currentColor; }

Example of correct code:

a { color: var(--color-white); }

a { color: -var(--color-white); }

a { color: color(red alpha(-10%)); }

Default configuration

// defaults
{
  ignoreVariables: true,
  ignoreFunctions: true,
  ignoreKeywords: null,
}

Further Reading