1
0
mirror of https://github.com/thangisme/notes.git synced 2024-11-01 03:17:30 -04:00
notes/node_modules/stylelint/lib/rules/unit-no-unknown
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00
..
index.js Initial commit 2017-03-09 13:16:08 -05:00
README.md Initial commit 2017-03-09 13:16:08 -05:00

unit-no-unknown

Disallow unknown units.

a { width: 100pixels; }
/**           ↑
 *  These units */

This rule considers units defined in the CSS Specifications, up to and including Editor's Drafts, to be known.

Options

true

The following patterns are considered warnings:

a {
  width: 10pixels;
}
a {
  width: calc(10px + 10pixels);
}

The following patterns are not considered warnings:

a {
  width: 10px;
}  
a {
  width: 10Px;
}  
a {
  width: 10pX;
}  
a {
  width: calc(10px + 10px);
}

Optional secondary options

ignoreUnits: ["/regex/", "string"]

Given:

["/^my-/", "custom"]

The following patterns are not considered warnings:

a {
  width: 10custom;
}
a {
  width: 10my-unit;
}
a {
  width: 10my-other-unit;
}