fix: KaTeX display blocks + prose spacing
- Replace overflow-x: auto with overflow: visible on .katex-display - Add white-space: normal on .katex-display > .katex - Add responsive scaling at 640px breakpoint - Add prose integration margin rules for spacing between prose and math
This commit is contained in:
@@ -282,9 +282,28 @@ html.dark code[data-theme*=" "] span {
|
||||
font-size: 1.1em !important;
|
||||
}
|
||||
.katex-display {
|
||||
margin: 1.5rem 0;
|
||||
overflow-x: auto;
|
||||
overflow: visible;
|
||||
max-width: 100%;
|
||||
margin: 1.5em 0;
|
||||
text-align: center;
|
||||
}
|
||||
.katex-display > .katex {
|
||||
display: block;
|
||||
text-align: center;
|
||||
white-space: normal;
|
||||
}
|
||||
@media (max-width: 640px) {
|
||||
.katex-display > .katex {
|
||||
transform: scale(0.85);
|
||||
transform-origin: center top;
|
||||
}
|
||||
.katex-display {
|
||||
margin: 0.8em 0;
|
||||
}
|
||||
}
|
||||
.prose p + .katex-display { margin-top: 0.5em; }
|
||||
.prose .katex-display + p { margin-bottom: 0.5em; }
|
||||
.prose p .katex { vertical-align: middle; }
|
||||
.katex .katex-mathml {
|
||||
position: absolute;
|
||||
clip: rect(1px, 1px, 1px, 1px);
|
||||
|
||||
Reference in New Issue
Block a user