Fix column overflow and render math with KaTeX
All checks were successful
Deploy to S3 / deploy (push) Successful in 1m41s
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user