Fix column overflow and render math with KaTeX
All checks were successful
Deploy to S3 / deploy (push) Successful in 1m41s

- minmax(0,1fr)+min-width:0 and pre-wrap so a long fenced line no longer blows out the grid
- build-time KaTeX via @vscode/markdown-it-katex; ship katex CSS+fonts and link in layouts
This commit is contained in:
2026-06-28 01:20:01 +00:00
parent de9a868050
commit afb33e26a6
6 changed files with 53 additions and 2 deletions

View File

@@ -64,10 +64,17 @@ a:hover {
.site-layout {
display: grid;
grid-template-columns: 1fr var(--sidebar-width);
grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
gap: 3rem;
}
/* Let the main column shrink below its content's intrinsic width so a long
line inside a <pre> scrolls within the box instead of blowing out the grid. */
.content {
min-width: 0;
overflow-wrap: break-word;
}
/* main content */
.content h1 {
@@ -151,6 +158,8 @@ a:hover {
background: var(--color-pre-bg);
padding: 1rem;
overflow-x: auto;
white-space: pre-wrap; /* soft-wrap long lines (these fences hold prose) */
overflow-wrap: anywhere; /* break a hypothetical unbroken token too */
margin-bottom: 1rem;
font-size: 0.85rem;
line-height: 1.5;