mirror of
https://github.com/thangisme/notes.git
synced 2024-06-12 05:00:42 +00:00
40 lines
532 B
Markdown
40 lines
532 B
Markdown
|
# number-max-precision
|
||
|
|
||
|
Limit the number of decimal places allowed in numbers.
|
||
|
|
||
|
```css
|
||
|
a { top: 3.245634px; }
|
||
|
/** ↑
|
||
|
* These decimal places */
|
||
|
```
|
||
|
|
||
|
## Options
|
||
|
|
||
|
`int`: Maximum number of decimal places allowed.
|
||
|
|
||
|
For example, with `2`:
|
||
|
|
||
|
The following patterns are considered warnings:
|
||
|
|
||
|
```css
|
||
|
a { top: 3.245px; }
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
a { top: 3.245634px; }
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
@media (min-width: 3.234em) {}
|
||
|
```
|
||
|
|
||
|
The following patterns are *not* considered warnings:
|
||
|
|
||
|
```css
|
||
|
a { top: 3.24px; }
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
@media (min-width: 3.23em) {}
|
||
|
```
|