Skip to content

Instantly share code, notes, and snippets.

@jensgro
Created September 27, 2025 21:27
Show Gist options
  • Save jensgro/38e32287a12ab593214977238b6b37ba to your computer and use it in GitHub Desktop.
Save jensgro/38e32287a12ab593214977238b6b37ba to your computer and use it in GitHub Desktop.
Basis-CSS für MathML, generiert von Github Copilot
/* Basic stylesheet for MathML elements */
math {
font-family: 'Times New Roman', Times, serif;
font-size: 1em;
line-height: 1.2;
}
mrow,
mfrac,
msqrt,
mroot,
mi,
mo,
mn,
ms,
mtext,
mtable,
mtr,
mtd,
mstyle {
display: inline-block;
vertical-align: middle;
}
mi {
font-style: italic;
}
mo {
margin: 0 0.2em;
}
mfrac {
display: inline-flex;
flex-direction: column;
align-items: center;
}
mfrac>* {
display: block;
text-align: center;
}
mfrac> :first-child {
border-bottom: 1px solid currentColor;
}
msqrt {
border-top: 1px solid currentColor;
padding-left: 0.2em;
}
mroot {
display: inline-flex;
align-items: flex-start;
}
mroot> :first-child {
border-top: 1px solid currentColor;
padding-left: 0.2em;
}
mroot> :last-child {
font-size: 0.6em;
vertical-align: 0.4em;
}
mtable {
border-collapse: collapse;
margin: 0.5em 0;
}
mtr {
display: table-row;
}
mtd {
display: table-cell;
padding: 0.2em;
text-align: center;
}
mstyle {
display: inline-block;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment