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

794 B

length-zero-no-unit

Disallow units for zero lengths.

a { top: 0px; }
/**      ↑↑
 * This zero and this type of length unit */

Lengths refer to distance measurements. A length is a dimension, which is a number immediately followed by a unit identifier. However, for zero lengths the unit identifier is optional. The length units are: em, ex, ch, vw, vh, cm, mm, in, pt, pc, px, rem, vmin, and vmax.

Options

true

The following patterns are considered warnings:

a { top: 0px }
a { top: 0.000em }

The following patterns are not considered warnings:

a { top: 0 } /* no unit */
a { transition-delay: 0s; } /* dimension */
a { top: 2in; }
a { top: 1.001vh }