Skip to content

Commit 5c7081f

Browse files
authored
style: fix mobile layout overflow (#102)
1 parent 750f7b2 commit 5c7081f

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

assets/style.css

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ body {
8080
display: flex;
8181
flex-direction: column;
8282
min-height: 100vh;
83+
overflow-wrap: break-word;
8384
}
8485

8586
/* -- Typography -- */
@@ -91,6 +92,7 @@ h1, h2, h3, h4, h5, h6 {
9192
line-height: 1.3;
9293
color: var(--text-primary);
9394
letter-spacing: -0.025em;
95+
overflow-wrap: break-word;
9496
}
9597

9698
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
@@ -125,6 +127,7 @@ a {
125127
text-decoration: none;
126128
font-weight: 500;
127129
transition: color 0.2s ease, text-decoration-color 0.2s ease;
130+
overflow-wrap: break-word;
128131
}
129132

130133
a:hover {
@@ -167,6 +170,7 @@ li {
167170
border: 1px solid var(--border-subtle);
168171
text-decoration: none !important;
169172
transition: all 0.2s ease;
173+
min-width: 0;
170174
}
171175

172176
.article-item:hover {
@@ -179,6 +183,7 @@ li {
179183
font-weight: 600;
180184
color: var(--text-primary);
181185
font-size: 1.05rem;
186+
min-width: 0;
182187
}
183188

184189
.article-date {
@@ -243,6 +248,7 @@ li {
243248
font-size: 1.1rem;
244249
color: var(--text-primary);
245250
font-weight: 500;
251+
min-width: 0;
246252
}
247253

248254
.monthly-item-meta {
@@ -977,6 +983,9 @@ table {
977983
border-collapse: collapse;
978984
margin: 1.5rem 0;
979985
font-size: 0.95rem;
986+
display: block;
987+
overflow-x: auto;
988+
-webkit-overflow-scrolling: touch;
980989
}
981990

982991
th, td {
@@ -995,7 +1004,7 @@ tr:nth-child(even) {
9951004
background-color: rgba(0,0,0,0.01);
9961005
}
9971006

998-
img {
1007+
img, video, iframe, embed, object, canvas, svg {
9991008
max-width: 100%;
10001009
height: auto;
10011010
border-radius: 4px;
@@ -1008,6 +1017,13 @@ figcaption {
10081017
color: var(--text-tertiary);
10091018
}
10101019

1020+
.katex-display {
1021+
overflow-x: auto;
1022+
overflow-y: hidden;
1023+
-webkit-overflow-scrolling: touch;
1024+
padding: 1rem 0;
1025+
}
1026+
10111027
footer {
10121028
margin-top: auto;
10131029
border-top: 1px solid var(--border-subtle);
@@ -1237,6 +1253,11 @@ footer .social-links {
12371253
nav a:last-child {
12381254
border-bottom: none;
12391255
}
1256+
1257+
.article-title, .monthly-item-title {
1258+
overflow-wrap: break-word;
1259+
word-break: break-word;
1260+
}
12401261
}
12411262

12421263
hr {

0 commit comments

Comments
 (0)