Skip to content

Commit 8f0c8b3

Browse files
committed
Fix math formula making container oversized
1 parent edc9408 commit 8f0c8b3

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

.changeset/tidy-garlics-raise.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'hexo-theme-cupertino': patch
3+
---
4+
5+
Fix math formula making container oversized.

source/css/post.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ body {
123123
#{$content} > video,
124124
#{$content} > ul,
125125
#{$content} > ol,
126-
#{$content} > mjx-container,
127126
#{$content} > .katex,
128127
.about {
129128
@include ctn;
@@ -273,7 +272,12 @@ body {
273272
}
274273

275274
/* for [hexo-math](https://github.com/hexojs/hexo-math): */
276-
#{$content} > mjx-container,
275+
#{$content} > p:has(mjx-container) {
276+
max-width: none;
277+
overflow-x: auto;
278+
overscroll-behavior-x: contain;
279+
text-align: center;
280+
}
277281
#{$content} > .katex {
278282
display: block;
279283
text-align: center;

0 commit comments

Comments
 (0)