Skip to content

Commit a8628ce

Browse files
committed
fix: formatting of articles with code blocks
1 parent ad92cc0 commit a8628ce

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

assets/styles/styles.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,16 +184,33 @@ main {
184184
flex-direction: column;
185185
}
186186

187+
pre {
188+
max-width: calc(100vw - 80px);
189+
}
190+
191+
code.hljs {
192+
margin-left: 0;
193+
max-width: 100%;
194+
}
195+
187196
@media only screen and (max-width: 600px) {
188197
main {
189198
padding: 20px;
190199
}
200+
201+
pre {
202+
max-width: calc(100vw - 40px);
203+
}
191204
}
192205

193206
@media only screen and (max-width: 420px) {
194207
main {
195208
padding: 10px;
196209
}
210+
211+
pre {
212+
max-width: calc(100vw - 20px);
213+
}
197214
}
198215

199216
main > p {

0 commit comments

Comments
 (0)