Skip to content

Commit 94fc518

Browse files
committed
use rem instead of em for examples
Not safe to use em since if you don't have any explicit font-size defined, it just do nothing. Here was a example where using em didn't work ```html <style> @import "../node_modules/cssrecipes-custom-media-queries/index.css"; @import "../node_modules/cssrecipes-grid/index.css"; @import "../node_modules/cssrecipes-utils/lib/all.css"; @import "../node_modules/cssrecipes-utils/lib/max.css"; .r-Grid { width: 50em; } </style> <body> <div class="r-Grid"> <h1 class="r-Grid-cell"> Hi there </h1> </div> ``` .r-Grid have width == 0 :( (confirmed on firefox & chrome)
1 parent 146c0c8 commit 94fc518

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ First of all, you can override all these custom properties according to your nee
6767

6868
@media (--r-minM) {
6969
.r-Grid {
70-
width: 30em;
70+
width: 30rem;
7171
}
7272
}
7373

7474
@media (--r-minL) {
7575
.r-Grid {
76-
width: 50em;
76+
width: 50rem;
7777
}
7878
}
7979

@@ -113,13 +113,13 @@ First of all, you can override all these custom properties according to your nee
113113

114114
@media (--r-maxL) {
115115
.r-Grid {
116-
width: 50em;
116+
width: 50rem;
117117
}
118118
}
119119

120120
@media (--r-maxM) {
121121
.r-Grid {
122-
width: 30em;
122+
width: 30rem;
123123
}
124124
}
125125

@@ -152,7 +152,7 @@ First of all, you can override all these custom properties according to your nee
152152

153153
```css
154154
.r-Grid {
155-
width: 50em;
155+
width: 50rem;
156156
}
157157
```
158158

0 commit comments

Comments
 (0)