Commit c1a80f7

HPCesia <me@hpcesia.com>
2026-03-05 10:22:47
Math style
1 parent 619128c
Changed files (3)
src
src/layouts/GlobalLayout.astro
@@ -35,6 +35,11 @@ const {
 
     <meta property="twitter:title" content={title} />
     <meta property="twitter:description" content={description} />
+
+    <link
+      rel="stylesheet"
+      href="https://fred-wang.github.io/MathFonts/NewComputerModern/mathfonts.css"
+    />
   </head>
   <body class="mx-auto px-4 max-w-268 font-serif">
     <Header />
src/styles/article/index.css
@@ -11,6 +11,10 @@ article,
   @import "./list.css";
 }
 article,
+.article-math {
+  @import "./math.css";
+}
+article,
 .article-paragraph {
   @import "./paragrah.css";
 }
src/styles/article/math.css
@@ -0,0 +1,9 @@
+@import "../../contents/_lib/mathyml/src/mathyml.css";
+
+math {
+  &[display="block"] {
+    /* MathML overflow is not supported in Firefox */
+    /* See https://bugzilla.mozilla.org/show_bug.cgi?id=1928784 */
+    @apply overflow-x-auto overflow-y-hidden;
+  }
+}