From e55fd333c9d1afabf5a4818eaf925cf31f677975 Mon Sep 17 00:00:00 2001 From: tdro Date: Tue, 17 Oct 2023 18:54:19 -0400 Subject: themes/default/layouts/_default/_markup: Support MathML --- assets/css/default.css | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) (limited to 'assets/css') diff --git a/assets/css/default.css b/assets/css/default.css index fa78d32..9f8fc11 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -221,6 +221,11 @@ h3 { margin: 0; } +math { + font-family: "CMU Serif", serif; + font-size: 110%; +} + micro-card[id] article h1, micro-card[id] article h2, micro-card[id] article h3 { @@ -1419,7 +1424,9 @@ micro-summary details[data-disclosure][open] ~ *:not(details):not(micro-tags) { display: inherit; } -micro-summary details[data-disclosure][open] ~ *:not(details):not(micro-tags) { +micro-summary + details[data-disclosure][open] + ~ *:not(details):not(micro-tags):not(math-ml) { color: #444; color: var(--fade); } @@ -2220,6 +2227,45 @@ link-card article a { display: block; } +math-ml, +math-ml math { + display: block math; +} + +math-ml:not(:last-child) { + margin-bottom: 0.75rem; +} + +math-ml figure[id] { + scroll-margin-top: 6rem; +} + +math-ml figure[id] figure { + overflow-x: auto; + overflow-y: hidden; + margin: 0; +} + +math-ml figure[id] a:first-child { + font-size: 85%; + margin: 0 0.25rem; + padding: 0.125rem 0.25rem; + text-decoration: none; + font-weight: 700; + outline: 1px solid; + border-radius: 0.25rem; + display: inline-block; + line-height: 100%; +} + +math-ml figure[id]:target figure { + background-color: #ffe699; + background-color: var(--warning-background); + color: #000; + outline: 2px solid; + border-radius: 0.5rem; +} + /* ----- Attributes ----- */ [tabindex="-1"]:focus { -- cgit v1.2.3