Skip to content

Commit c7a950a

Browse files
committed
Put preview above editor on mobile
1 parent 68b5c69 commit c7a950a

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

style.css

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ header .title::after {
121121
left: 100%;
122122

123123
font-family: var(--font-family-text);
124-
font-size: min(max(0.75rem, 4vw), 1.5rem);
124+
font-size: clamp(0.75rem, 4vw, 1.5rem);
125125
text-align: right;
126126
}
127127

@@ -206,11 +206,23 @@ section:has(code-bedder) {
206206
grid-auto-rows: 33vh;
207207
}
208208

209+
iframe {
210+
grid-row-start: 1;
211+
width: 100%;
212+
height: 100%;
213+
border: 0;
214+
background: var(--primary-500); /* mask white bottom line on mobile */
215+
}
216+
209217
@media (min-width: 960px) {
210218
section:has(code-bedder) {
211219
grid-auto-rows: initial;
212220
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
213221
}
222+
223+
iframe {
224+
grid-row-start: initial;
225+
}
214226
}
215227

216228
section:not(:has(code-bedder)) {
@@ -226,16 +238,6 @@ section:not(:has(code-bedder)) {
226238
}
227239
}
228240

229-
iframe {
230-
width: 100%;
231-
height: 100%;
232-
border: 0;
233-
}
234-
235-
code-bedder {
236-
max-height: 100vh;
237-
}
238-
239241
/* Buy */
240242
section:has(#buy) dl {
241243
display: flex;

0 commit comments

Comments
 (0)