Sfoglia il codice sorgente

Convert rem's to em's in breakpoints to fix layout jerking issue in e.g. iPad and when resizing viewport.

Antti Järvinen 9 anni fa
parent
commit
6d6546011f
2 ha cambiato i file con 11 aggiunte e 11 eliminazioni
  1. 8
    8
      static/css/hyde.css
  2. 3
    3
      static/css/poole.css

+ 8
- 8
static/css/hyde.css Vedi File

@@ -34,12 +34,12 @@
34 34
 html {
35 35
   font-family: "PT Sans", Helvetica, Arial, sans-serif;
36 36
 }
37
-@media (min-width: 48rem) {
37
+@media (min-width: 48em) {
38 38
   html {
39 39
     font-size: 16px;
40 40
   }
41 41
 }
42
-@media (min-width: 58rem) {
42
+@media (min-width: 58em) {
43 43
   html {
44 44
     font-size: 20px;
45 45
   }
@@ -59,7 +59,7 @@ html {
59 59
   color: rgba(255,255,255,.5);
60 60
   background-color: #202020;
61 61
 }
62
-@media (min-width: 48rem) {
62
+@media (min-width: 48em) {
63 63
   .sidebar {
64 64
     position: fixed;
65 65
     top: 0;
@@ -105,7 +105,7 @@ a.sidebar-nav-item:focus {
105 105
  * contents to the bottom of the sidebar in tablets and up.
106 106
  */
107 107
 
108
-@media (min-width: 48rem) {
108
+@media (min-width: 48em) {
109 109
   .sidebar-sticky {
110 110
     position: absolute;
111 111
     right:  1rem;
@@ -126,7 +126,7 @@ a.sidebar-nav-item:focus {
126 126
   padding-bottom: 4rem;
127 127
 }
128 128
 
129
-@media (min-width: 48rem) {
129
+@media (min-width: 48em) {
130 130
   .content {
131 131
     max-width: 38rem;
132 132
     margin-left: 20rem;
@@ -134,7 +134,7 @@ a.sidebar-nav-item:focus {
134 134
   }
135 135
 }
136 136
 
137
-@media (min-width: 64rem) {
137
+@media (min-width: 64em) {
138 138
   .content {
139 139
     margin-left: 22rem;
140 140
     margin-right: 4rem;
@@ -148,7 +148,7 @@ a.sidebar-nav-item:focus {
148 148
  * Flip the orientation of the page by placing the `.sidebar` on the right.
149 149
  */
150 150
 
151
-@media (min-width: 48rem) {
151
+@media (min-width: 48em) {
152 152
   .layout-reverse .sidebar {
153 153
     left: auto;
154 154
     right: 0;
@@ -159,7 +159,7 @@ a.sidebar-nav-item:focus {
159 159
   }
160 160
 }
161 161
 
162
-@media (min-width: 64rem) {
162
+@media (min-width: 64em) {
163 163
   .layout-reverse .content {
164 164
     margin-left: 4rem;
165 165
     margin-right: 22rem;

+ 3
- 3
static/css/poole.css Vedi File

@@ -52,7 +52,7 @@ html {
52 52
   font-size: 16px;
53 53
   line-height: 1.5;
54 54
 }
55
-@media (min-width: 38rem) {
55
+@media (min-width: 38em) {
56 56
   html {
57 57
     font-size: 20px;
58 58
   }
@@ -193,7 +193,7 @@ blockquote {
193 193
 blockquote p:last-child {
194 194
   margin-bottom: 0;
195 195
 }
196
-@media (min-width: 30rem) {
196
+@media (min-width: 30em) {
197 197
   blockquote {
198 198
     padding-right: 5rem;
199 199
     padding-left: 1.25rem;
@@ -382,7 +382,7 @@ a.pagination-item:hover {
382 382
   background-color: #f5f5f5;
383 383
 }
384 384
 
385
-@media (min-width: 30rem) {
385
+@media (min-width: 30em) {
386 386
   .pagination {
387 387
     margin: 3rem 0;
388 388
   }