Skip to content

Files

Latest commit

 

History

History
58 lines (39 loc) · 1.13 KB

property-disallowed-list.md

File metadata and controls

58 lines (39 loc) · 1.13 KB

Pattern: Use of restricted property

Issue: -

Description

This rules enforces a blacklist of disallowed properties.

Examples

array|string: ["array", "of", "unprefixed", "properties" or "regex"]|"property"|"/regex/"

If a string is surrounded with "/" (e.g. "/^background/"), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: /^background/ will match background, background-size, background-color, etc.

Given:

[ "text-rendering", "animation", "/^background/" ]

The following patterns are considered violations:

a { text-rendering: optimizeLegibility; }
a {
  animation: some-animation 2s;
  color: pink;
}
a { -webkit-animation: some-animation 2s; }
a { background: pink; }
a { background-size: cover; }

The following patterns are not considered violations:

a { color: pink; }
a { no-background: sure; }

Further Reading