1 @namespace "http://www.w3.org/1998/Math/MathML";
4 -webkit-line-box-contain: glyphs replaced;
8 letter-spacing: normal;
15 /* Keep font-family and other defaults here consistent with http://mxr.mozilla.org/mozilla-central/source/layout/mathml/mathml.css and feedback from www-math. */
17 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
18 /* We explicitly include the font Symbol as it's the iOS equivalent of font STIXGeneral. */
19 font-family: STIXGeneral, Symbol, "Times New Roman", sans-serif;
21 font-family: "Latin Modern Math", MathJax_Main, STIXGeneral, STIXSizeOneSym, "DejaVu Sans", "DejaVu Serif", Cambria, "Cambria Math", "Lucida Sans Unicode", "Arial Unicode MS", "Lucida Grande", OpenSymbol, "Standard Symbols L", Times, serif;
26 display: -webkit-inline-flex !important;
31 math[display="block"] {
32 display: flex !important;
33 justify-content: center;
34 page-break-inside: avoid;
35 /* -webkit-margin-before: 1em; -- FIXME: Ask www-math for a default MathML stylesheet, including this (or margin-top). */
36 -webkit-margin-after: 1em;
39 ms, mi, mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle, menclose {
40 display: -webkit-inline-flex !important;
43 ms, mtext, mi, mn, mo, annotation, mtd {
44 white-space: nowrap !important;
47 mo, mfrac, munder, mover, munderover {
48 flex-direction: column;
51 munder, mover, munderover {
58 mfrac[numalign="left"] > :first-child {
59 align-self: flex-start;
61 mfrac[numalign="right"] > :first-child {
64 mfrac[denomalign="left"] > :last-child {
65 align-self: flex-start;
67 mfrac[denomalign="right"] > :last-child {
70 mfrac > :first-child {
71 -webkit-margin-after: 0.2em;
74 -webkit-margin-before: 0.2em;
77 -webkit-margin-start: 1px;
78 -webkit-margin-end: 1px;
81 mover > :last-child, munderover > :last-child {
85 msub > * + *, msup > * + *, msubsup > * + *, mmultiscripts > * + *, munder > * + *, mover > * + *, munderover > * + * {
86 font-size: 0.75em; /* FIXME: MathML standard is 0.71em */
88 mroot > *:last-child {
89 font-size: 0.5625em; /* This 0.75^2 since the scriptlevel is incremented by 2 in the index. */
93 -webkit-padding-end: 0.1em;
95 msub > mi:first-child, msubsup > mi:first-child {
96 -webkit-padding-end: 0;
98 msubsup > mi:first-child + * + * {
99 -webkit-margin-start: 0.14em; /* This is larger than 0.1em because the child's font-size is smaller than the <msubsup>'s. */
102 math[mathvariant="normal"], mstyle[mathvariant="normal"], mo[mathvariant="normal"], mn[mathvariant="normal"], mi[mathvariant="normal"], mtext[mathvariant="normal"], mspace[mathvariant="normal"], ms[mathvariant="normal"] {
107 math[mathvariant="bold"], mstyle[mathvariant="bold"], mo[mathvariant="bold"], mn[mathvariant="bold"], mi[mathvariant="bold"], mtext[mathvariant="bold"], mspace[mathvariant="bold"], ms[mathvariant="bold"] {
112 math[mathvariant="italic"], mstyle[mathvariant="italic"], mo[mathvariant="italic"], mn[mathvariant="italic"], mi[mathvariant="italic"], mtext[mathvariant="italic"], mspace[mathvariant="italic"], ms[mathvariant="italic"] {
117 math[mathvariant="bold-italic"], mstyle[mathvariant="bold-italic"], mo[mathvariant="bold-italic"], mn[mathvariant="bold-italic"], mi[mathvariant="bold-italic"], mtext[mathvariant="bold-italic"], mspace[mathvariant="bold-italic"], ms[mathvariant="bold-italic"] {
122 math[mathsize="small"], mstyle[mathsize="small"], mo[mathsize="small"], mn[mathsize="small"], mi[mathsize="small"], mtext[mathsize="small"], mspace[mathsize="small"], ms[mathsize="small"] {
126 math[mathsize="normal"], mstyle[mathsize="normal"], mo[mathsize="normal"], mn[mathsize="normal"], mi[mathsize="normal"], mtext[mathsize="normal"], mspace[mathsize="normal"], ms[mathsize="normal"] {
130 math[mathsize="big"], mstyle[mathsize="big"], mo[mathsize="big"], mn[mathsize="big"], mi[mathsize="big"], mtext[mathsize="big"], mspace[mathsize="big"], ms[mathsize="big"] {
138 /* This is a special style for erroneous markup:
140 - extra children in script elements.
141 - <mprescripts/> and <none/> elements in msub/msup/msubsup.
143 merror, msub > * + * + *, msup > * + * + *, msubsup > * + * + * + *, msub > mprescripts, msup > mprescripts, msubsup > mprescripts, msub > none, msup > none, msubsup > none, mmultiscripts > mprescripts ~ mprescripts, mmultiscripts > mprescripts ~ mprescripts ~ * {
144 outline: solid thin red;
146 font-family: sans-serif;
147 background-color: lightYellow;
151 display: inline-table;
164 mtable[columnalign="left"], mtr[columnalign="left"], mtd[columnalign="left"] {
168 mtable[columnalign="right"], mtr[columnalign="right"], mtd[columnalign="right"] {
172 mtable[rowalign="top"] mtd, mtable mtr[rowalign="top"] mtd, mtable mtr mtd[rowalign="top"] {
176 mtable[rowalign="bottom"] mtd, mtable mtr[rowalign="bottom"] mtd, mtable mtr mtd[rowalign="bottom"] {
177 vertical-align: bottom;
180 mtable[rowalign="center"] mtd, mtable mtr[rowalign="center"] mtd, mtable mtr mtd[rowalign="center"] {
181 vertical-align: middle;
184 mtable[frame="solid"] {
188 mtable[frame="dashed"] {
192 mtable[rowlines="solid"], mtable[rowlines="dashed"], mtable[columnlines="solid"], mtable[columnlines="dashed"] {
193 border-collapse: collapse;
196 mtable[rowlines="solid"] > mtr + mtr {
197 border-top: solid thin;
200 mtable[rowlines="dashed"] > mtr + mtr {
201 border-top: dashed thin;
204 mtable[columnlines="solid"] > mtr > mtd + mtd {
205 border-left: solid thin;
208 mtable[columnlines="dashed"] > mtr > mtd + mtd {
209 border-left: dashed thin;