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;
48 flex-direction: column;
54 mfrac[numalign="left"] > :first-child {
55 align-self: flex-start;
57 mfrac[numalign="right"] > :first-child {
60 mfrac[denomalign="left"] > :last-child {
61 align-self: flex-start;
63 mfrac[denomalign="right"] > :last-child {
66 mfrac > :first-child {
67 -webkit-margin-after: 0.2em;
70 -webkit-margin-before: 0.2em;
73 -webkit-margin-start: 1px;
74 -webkit-margin-end: 1px;
77 msub > * + *, msup > * + *, msubsup > * + *, mmultiscripts > * + *, munder > * + *, mover > * + *, munderover > * + * {
78 font-size: 0.75em; /* FIXME: MathML standard is 0.71em */
80 mroot > *:last-child {
81 font-size: 0.5625em; /* This 0.75^2 since the scriptlevel is incremented by 2 in the index. */
85 -webkit-padding-end: 0.1em;
87 msub > mi:first-child, msubsup > mi:first-child {
88 -webkit-padding-end: 0;
90 msubsup > mi:first-child + * + * {
91 -webkit-margin-start: 0.14em; /* This is larger than 0.1em because the child's font-size is smaller than the <msubsup>'s. */
94 math[mathvariant="normal"], mstyle[mathvariant="normal"], mo[mathvariant="normal"], mn[mathvariant="normal"], mi[mathvariant="normal"], mtext[mathvariant="normal"], mspace[mathvariant="normal"], ms[mathvariant="normal"] {
99 math[mathvariant="bold"], mstyle[mathvariant="bold"], mo[mathvariant="bold"], mn[mathvariant="bold"], mi[mathvariant="bold"], mtext[mathvariant="bold"], mspace[mathvariant="bold"], ms[mathvariant="bold"] {
104 math[mathvariant="italic"], mstyle[mathvariant="italic"], mo[mathvariant="italic"], mn[mathvariant="italic"], mi[mathvariant="italic"], mtext[mathvariant="italic"], mspace[mathvariant="italic"], ms[mathvariant="italic"] {
109 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"] {
114 math[mathsize="small"], mstyle[mathsize="small"], mo[mathsize="small"], mn[mathsize="small"], mi[mathsize="small"], mtext[mathsize="small"], mspace[mathsize="small"], ms[mathsize="small"] {
118 math[mathsize="normal"], mstyle[mathsize="normal"], mo[mathsize="normal"], mn[mathsize="normal"], mi[mathsize="normal"], mtext[mathsize="normal"], mspace[mathsize="normal"], ms[mathsize="normal"] {
122 math[mathsize="big"], mstyle[mathsize="big"], mo[mathsize="big"], mn[mathsize="big"], mi[mathsize="big"], mtext[mathsize="big"], mspace[mathsize="big"], ms[mathsize="big"] {
130 /* This is a special style for erroneous markup:
132 - extra children in script elements.
133 - <mprescripts/> and <none/> elements in msub/msup/msubsup.
135 merror, msub > * + * + *, msup > * + * + *, msubsup > * + * + * + *, msub > mprescripts, msup > mprescripts, msubsup > mprescripts, msub > none, msup > none, msubsup > none, mmultiscripts > mprescripts ~ mprescripts, mmultiscripts > mprescripts ~ mprescripts ~ * {
136 outline: solid thin red;
138 font-family: sans-serif;
139 background-color: lightYellow;
143 display: inline-table;
156 mtable[columnalign="left"], mtr[columnalign="left"], mtd[columnalign="left"] {
160 mtable[columnalign="right"], mtr[columnalign="right"], mtd[columnalign="right"] {
164 mtable[rowalign="top"] mtd, mtable mtr[rowalign="top"] mtd, mtable mtr mtd[rowalign="top"] {
168 mtable[rowalign="bottom"] mtd, mtable mtr[rowalign="bottom"] mtd, mtable mtr mtd[rowalign="bottom"] {
169 vertical-align: bottom;
172 mtable[rowalign="center"] mtd, mtable mtr[rowalign="center"] mtd, mtable mtr mtd[rowalign="center"] {
173 vertical-align: middle;
176 mtable[frame="solid"] {
180 mtable[frame="dashed"] {
184 mtable[rowlines="solid"], mtable[rowlines="dashed"], mtable[columnlines="solid"], mtable[columnlines="dashed"] {
185 border-collapse: collapse;
188 mtable[rowlines="solid"] > mtr + mtr {
189 border-top: solid thin;
192 mtable[rowlines="dashed"] > mtr + mtr {
193 border-top: dashed thin;
196 mtable[columnlines="solid"] > mtr > mtd + mtd {
197 border-left: solid thin;
200 mtable[columnlines="dashed"] > mtr > mtd + mtd {
201 border-left: dashed thin;