Skip to content

Commit 0be3461

Browse files
committed
update: mobile style
1 parent 1293dbe commit 0be3461

File tree

3 files changed

+56
-1
lines changed

3 files changed

+56
-1
lines changed

_sass/_base.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
******************************************************************************/
44
@use "variables" as v;
55

6+
html, body {
7+
overflow-x: hidden;
8+
}
9+
610
body {
711
font-family: v.$font-family-base;
812
font-size: 18px;

_sass/_distill.scss

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,17 @@ d-article {
101101
}
102102
}
103103

104+
d-bibliography {
105+
overflow-wrap: break-word;
106+
word-wrap: break-word;
107+
word-break: break-all;
108+
109+
ol, ul, li, span {
110+
overflow-wrap: break-word;
111+
word-wrap: break-word;
112+
}
113+
}
114+
104115
d-appendix {
105116
border-top-color: var(--global-divider-color) !important;
106117
color: var(--global-distill-app-color) !important;
@@ -229,3 +240,43 @@ d-appendix {
229240
@media (max-width: 1400px) {
230241
.toc-sidebar { display: none; }
231242
}
243+
244+
/*******************************************************************************
245+
* Mobile responsive overrides
246+
******************************************************************************/
247+
@media (max-width: 768px) {
248+
// Prevent l-page / l-screen figures from overflowing viewport
249+
d-article figure.l-page,
250+
d-article figure.l-screen,
251+
d-article .l-page,
252+
d-article .l-screen {
253+
width: 100% !important;
254+
max-width: 100vw !important;
255+
margin-left: 0 !important;
256+
margin-right: 0 !important;
257+
grid-column: text !important;
258+
}
259+
260+
// Tables: horizontal scroll instead of overflow
261+
d-article table {
262+
display: block;
263+
overflow-x: auto;
264+
-webkit-overflow-scrolling: touch;
265+
}
266+
267+
// Video grid: single column on mobile
268+
.video-grid {
269+
grid-template-columns: 1fr !important;
270+
}
271+
272+
// Image grids: single column on narrow screens
273+
.image-grid-2,
274+
.image-grid-3 {
275+
grid-template-columns: 1fr !important;
276+
}
277+
278+
// Navbar controls: tighter spacing
279+
.nav-controls {
280+
gap: 6px;
281+
}
282+
}

_sass/_layout.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
.navbar {
1212
background-color: var(--global-bg-color);
1313
border-bottom: 1px solid var(--global-divider-color);
14-
padding: 0.5rem 0;
14+
padding: 0.5rem 1rem;
1515

1616
.navbar-brand {
1717
color: var(--global-text-color);

0 commit comments

Comments
 (0)