You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-2Lines changed: 25 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,28 @@ A plugin for [PostCSS](https://github.com/ai/postcss) that generates rem units f
8
8
Pixels are the easiest unit to use (*opinion*). The only issue with them is that they don't let browsers change the default font size of 16. This script converts every px value to a rem from the properties you choose to allow the browser to set the font size.
9
9
10
10
11
+
### Input/Output
12
+
13
+
*With the default settings, only font related properties are targeted.*
14
+
15
+
```css
16
+
// input
17
+
h1 {
18
+
margin: 0020px;
19
+
font-size: 32px;
20
+
line-height: 1.2;
21
+
letter-spacing: 1px;
22
+
}
23
+
24
+
// output
25
+
h1 {
26
+
margin: 0020px;
27
+
font-size: 2rem;
28
+
line-height: 1.2;
29
+
letter-spacing: 0.0625rem;
30
+
}
31
+
```
32
+
11
33
### Example
12
34
13
35
```js
@@ -51,11 +73,12 @@ Default:
51
73
-`media_query` (Boolean) Allow px to be converted in media queries.
0 commit comments