mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-12-02 12:45:09 +08:00
Merge branch 'dev' of https://github.com/jerryc127/hexo-theme-butterfly into dev
This commit is contained in:
commit
ccad9536e8
1 file changed
+29
-2
@@ -270,7 +270,8 @@ if hexo-config('math.use')
|
||||
|
||||
if hexo-config('math.hide_scrollbar')
|
||||
.katex-display,
|
||||
mjx-container
|
||||
mjx-container,
|
||||
#article-container :is(p, li):has(mjx-container:not([display]))
|
||||
scrollbar-width: none
|
||||
|
||||
&::-webkit-scrollbar
|
||||
@@ -287,8 +288,34 @@ if hexo-config('math.use')
|
||||
display: block !important
|
||||
min-width: auto !important
|
||||
|
||||
// MathJax 4 splits an inline formula into several <svg> + <mjx-break>.
|
||||
// Inline layout keeps the line spacing and each part's vertical-align,
|
||||
// and nowrap keeps these parts on one line.
|
||||
&:not([display])
|
||||
display: inline-grid !important
|
||||
display: inline !important
|
||||
white-space: nowrap
|
||||
|
||||
// Let the block-level parent scroll instead of overflowing the page.
|
||||
// p / li alone is not enough: headings and note bodies overflow too,
|
||||
// because max-width no longer applies once mjx-container is inline.
|
||||
#article-container :is(p, h1, h2, h3, h4, h5, h6):has(mjx-container:not([display]))
|
||||
overflow-x: auto
|
||||
|
||||
// A scrolling li clips its outside-positioned ::marker.
|
||||
#article-container li:has(mjx-container:not([display]))
|
||||
overflow-x: auto
|
||||
list-style-position: inside
|
||||
|
||||
// Without :has() the rules above are dropped while inline still applies.
|
||||
// Fall back to the previous inline-grid rather than an unclipped inline.
|
||||
@css {
|
||||
@supports not selector(:has(a)) {
|
||||
mjx-container:not([display]) {
|
||||
display: inline-grid !important;
|
||||
white-space: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mjx-assistive-mml
|
||||
right: 0
|
||||
|
||||
Reference in new issue
Block a user