2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2000-07-10 17:58:27 +04:00
|
|
|
|
|
|
|
|
2002-02-14 15:26:43 +03:00
|
|
|
/**************************************************************************/
|
|
|
|
/* namespace for MathML elements */
|
|
|
|
/**************************************************************************/
|
2000-07-10 17:58:27 +04:00
|
|
|
|
2002-02-14 15:26:43 +03:00
|
|
|
@namespace url(http://www.w3.org/1998/Math/MathML);
|
2000-07-10 17:58:27 +04:00
|
|
|
|
2002-02-14 15:26:43 +03:00
|
|
|
/**************************************************************************/
|
|
|
|
/* <math> - outermost math element */
|
|
|
|
/**************************************************************************/
|
2000-07-10 17:58:27 +04:00
|
|
|
|
2001-02-23 15:49:38 +03:00
|
|
|
math {
|
2014-11-17 11:49:38 +03:00
|
|
|
writing-mode: horizontal-tb !important;
|
2003-09-23 00:52:26 +04:00
|
|
|
direction: ltr;
|
2003-09-23 01:01:03 +04:00
|
|
|
unicode-bidi: embed;
|
2010-02-02 10:29:59 +03:00
|
|
|
display: inline;
|
2000-07-10 17:58:27 +04:00
|
|
|
font-size: inherit;
|
2001-02-23 15:49:38 +03:00
|
|
|
font-style: normal;
|
2015-05-25 03:40:00 +03:00
|
|
|
font-family: serif;
|
2015-07-26 03:02:00 +03:00
|
|
|
line-height: normal;
|
|
|
|
word-spacing: normal;
|
|
|
|
letter-spacing: normal;
|
2008-04-09 09:30:08 +04:00
|
|
|
text-rendering: optimizeLegibility;
|
2006-12-06 01:28:07 +03:00
|
|
|
-moz-float-edge: margin-box;
|
2014-01-14 18:39:50 +04:00
|
|
|
-moz-math-display: inline;
|
2001-02-23 15:49:38 +03:00
|
|
|
}
|
2002-01-14 11:59:01 +03:00
|
|
|
math[mode="display"], math[display="block"] {
|
2000-07-10 17:58:27 +04:00
|
|
|
display: block;
|
2001-05-19 14:10:30 +04:00
|
|
|
text-align: -moz-center;
|
2014-01-14 18:39:50 +04:00
|
|
|
-moz-math-display: block;
|
2001-05-19 14:10:30 +04:00
|
|
|
}
|
2003-09-23 00:52:26 +04:00
|
|
|
math[display="inline"] {
|
2010-02-02 10:29:59 +03:00
|
|
|
display: inline;
|
2014-01-14 18:39:50 +04:00
|
|
|
-moz-math-display: inline;
|
|
|
|
}
|
|
|
|
math[displaystyle="false"] {
|
|
|
|
-moz-math-display: inline;
|
|
|
|
}
|
|
|
|
math[displaystyle="true"] {
|
|
|
|
-moz-math-display: block;
|
2003-09-23 00:52:26 +04:00
|
|
|
}
|
2001-05-19 14:10:30 +04:00
|
|
|
|
2002-02-14 15:26:43 +03:00
|
|
|
/**************************************************************************/
|
2013-12-02 20:50:27 +04:00
|
|
|
/* Token elements */
|
2002-02-14 15:26:43 +03:00
|
|
|
/**************************************************************************/
|
2000-07-10 17:58:27 +04:00
|
|
|
|
2013-12-02 20:50:27 +04:00
|
|
|
ms {
|
|
|
|
display: inline;
|
2002-02-14 15:26:43 +03:00
|
|
|
}
|
2013-12-02 20:50:27 +04:00
|
|
|
ms:before, ms:after {
|
|
|
|
content: "\0022"
|
2002-02-14 15:26:43 +03:00
|
|
|
}
|
2013-12-02 20:50:27 +04:00
|
|
|
ms[lquote]:before {
|
|
|
|
content: attr(lquote)
|
2005-09-07 03:47:01 +04:00
|
|
|
}
|
2013-12-02 20:50:27 +04:00
|
|
|
ms[rquote]:after {
|
|
|
|
content: attr(rquote)
|
|
|
|
}
|
2002-02-14 15:26:43 +03:00
|
|
|
|
2011-06-24 16:54:37 +04:00
|
|
|
/**************************************************************************/
|
|
|
|
/* Links */
|
|
|
|
/**************************************************************************/
|
2016-07-20 06:13:13 +03:00
|
|
|
:any-link {
|
2011-06-24 16:54:37 +04:00
|
|
|
text-decoration: none !important;
|
|
|
|
}
|
|
|
|
|
2002-02-14 15:26:43 +03:00
|
|
|
/**************************************************************************/
|
|
|
|
/* attributes common to all tags */
|
|
|
|
/**************************************************************************/
|
|
|
|
|
2013-12-02 20:50:27 +04:00
|
|
|
/* These attributes are mapped to style in nsMathMLElement.cpp:
|
|
|
|
|
|
|
|
- background -> background (deprecated)
|
|
|
|
- color -> color (deprecated)
|
|
|
|
- fontfamily -> font-family (deprecated)
|
|
|
|
- fontsize -> font-size (deprecated)
|
|
|
|
- fontstyle -> font-style (deprecated)
|
|
|
|
- fontweight -> font-weight (deprecated)
|
|
|
|
- mathvariant -> -moz-math-variant
|
|
|
|
- scriptsizemultiplier -> -moz-script-size-multiplier
|
|
|
|
- scriptminsize -> -moz-script-min-size
|
|
|
|
- scriptlevel -> -moz-script-level
|
|
|
|
- mathsize -> font-size
|
|
|
|
- mathcolor -> color
|
|
|
|
- mathbackground -> background
|
2002-02-14 15:26:43 +03:00
|
|
|
|
|
|
|
*/
|
2002-08-07 06:15:28 +04:00
|
|
|
|
2002-02-14 15:26:43 +03:00
|
|
|
|
|
|
|
/**************************************************************************/
|
2013-12-02 20:50:27 +04:00
|
|
|
/* merror */
|
2002-02-14 15:26:43 +03:00
|
|
|
/**************************************************************************/
|
2000-07-10 17:58:27 +04:00
|
|
|
|
|
|
|
merror {
|
|
|
|
display: block;
|
|
|
|
font-family: sans-serif;
|
|
|
|
font-weight: bold;
|
|
|
|
white-space: pre;
|
|
|
|
margin: 1em;
|
|
|
|
padding: 1em;
|
|
|
|
border-width: thin;
|
|
|
|
border-style: inset;
|
|
|
|
border-color: red;
|
|
|
|
font-size: 14pt;
|
|
|
|
background-color: lightyellow;
|
|
|
|
}
|
|
|
|
|
2002-02-14 15:26:43 +03:00
|
|
|
/**************************************************************************/
|
|
|
|
/* mtable and its related tags */
|
|
|
|
/**************************************************************************/
|
2000-07-10 17:58:27 +04:00
|
|
|
|
2002-01-25 10:03:43 +03:00
|
|
|
mtable {
|
2008-01-09 05:14:35 +03:00
|
|
|
display: inline-table;
|
2003-05-22 23:39:38 +04:00
|
|
|
border-collapse: separate;
|
|
|
|
border-spacing: 0;
|
2008-09-16 02:35:28 +04:00
|
|
|
text-indent: 0;
|
2002-01-25 10:03:43 +03:00
|
|
|
}
|
|
|
|
mtable[frame="none"] {
|
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
mtable[frame="solid"] {
|
|
|
|
border: solid thin;
|
|
|
|
}
|
|
|
|
mtable[frame="dashed"] {
|
|
|
|
border: dashed thin;
|
2000-07-10 17:58:27 +04:00
|
|
|
}
|
|
|
|
|
2011-09-27 06:13:23 +04:00
|
|
|
mtr, mlabeledtr {
|
2000-07-10 17:58:27 +04:00
|
|
|
display: table-row;
|
2006-09-07 07:45:45 +04:00
|
|
|
vertical-align: baseline;
|
2000-07-10 17:58:27 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
mtd {
|
|
|
|
display: table-cell;
|
2006-09-07 07:45:45 +04:00
|
|
|
vertical-align: inherit;
|
2002-01-25 10:03:43 +03:00
|
|
|
text-align: -moz-center;
|
2001-05-19 14:10:30 +04:00
|
|
|
white-space: nowrap;
|
2000-07-10 17:58:27 +04:00
|
|
|
}
|
|
|
|
|
2011-09-27 06:13:23 +04:00
|
|
|
/* Don't support m(labeled)tr without mtable, nor mtd without m(labeled)tr */
|
2006-08-12 11:46:29 +04:00
|
|
|
:not(mtable) > mtr,
|
2011-09-27 06:13:23 +04:00
|
|
|
:not(mtable) > mlabeledtr,
|
|
|
|
:not(mtr):not(mlabeledtr) > mtd {
|
2006-08-12 11:46:29 +04:00
|
|
|
display: none !important;
|
|
|
|
}
|
2002-01-25 10:03:43 +03:00
|
|
|
|
2011-09-27 06:13:23 +04:00
|
|
|
/* Hide the label because mlabeledtr is not supported yet (bug 356870). This
|
|
|
|
rule can be overriden by users. */
|
|
|
|
mlabeledtr > mtd:first-child {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2002-01-25 10:03:43 +03:00
|
|
|
/**********************************************************************/
|
2014-06-18 14:57:00 +04:00
|
|
|
/* rules to achieve the default spacing between cells. When rowspacing,
|
|
|
|
columnspacing and framespacing aren't set on mtable. The back-end code
|
2002-01-25 10:03:43 +03:00
|
|
|
will set the internal attributes depending on the cell's position.
|
2014-06-18 14:57:00 +04:00
|
|
|
When they are set, the spacing behaviour is handled outside of CSS */
|
2002-01-25 10:03:43 +03:00
|
|
|
mtd {
|
|
|
|
padding-right: 0.4em; /* half of columnspacing[colindex] */
|
|
|
|
padding-left: 0.4em; /* half of columnspacing[colindex-1] */
|
|
|
|
padding-bottom: 0.5ex; /* half of rowspacing[rowindex] */
|
|
|
|
padding-top: 0.5ex; /* half of rowspacing[rowindex-1] */
|
|
|
|
}
|
|
|
|
/* turn off the spacing at the periphery of boundary cells */
|
2006-09-07 07:45:45 +04:00
|
|
|
mtr:first-child > mtd {
|
2002-01-25 10:03:43 +03:00
|
|
|
padding-top: 0ex;
|
|
|
|
}
|
2006-09-07 07:45:45 +04:00
|
|
|
mtr:last-child > mtd {
|
2002-01-26 00:57:47 +03:00
|
|
|
padding-bottom: 0ex;
|
2002-01-25 10:03:43 +03:00
|
|
|
}
|
2006-09-07 07:45:45 +04:00
|
|
|
mtd:first-child {
|
2016-05-13 08:19:58 +03:00
|
|
|
padding-inline-start: 0em;
|
2002-01-25 10:03:43 +03:00
|
|
|
}
|
2006-09-07 07:45:45 +04:00
|
|
|
mtd:last-child {
|
2016-05-13 08:19:58 +03:00
|
|
|
padding-inline-end: 0em;
|
2002-01-25 10:03:43 +03:00
|
|
|
}
|
|
|
|
/* re-instate the spacing if the table has a surrounding frame */
|
2006-09-07 07:45:45 +04:00
|
|
|
mtable[frame="solid"] > mtr:first-child > mtd,
|
|
|
|
mtable[frame="dashed"] > mtr:first-child > mtd {
|
2002-01-25 10:03:43 +03:00
|
|
|
padding-top: 0.5ex; /* framespacing.top */
|
|
|
|
}
|
2006-09-07 07:45:45 +04:00
|
|
|
mtable[frame="solid"] > mtr:last-child > mtd,
|
|
|
|
mtable[frame="dashed"] > mtr:last-child > mtd {
|
2002-01-25 10:03:43 +03:00
|
|
|
padding-bottom: 0.5ex; /* framespacing.bottom */
|
|
|
|
}
|
2006-09-07 07:45:45 +04:00
|
|
|
mtable[frame="solid"] > mtr > mtd:first-child,
|
|
|
|
mtable[frame="dashed"] > mtr > mtd:first-child {
|
2016-05-13 08:19:58 +03:00
|
|
|
padding-inline-start: 0.4em; /* framespacing.left (or right in rtl)*/
|
2002-01-25 10:03:43 +03:00
|
|
|
}
|
2006-09-07 07:45:45 +04:00
|
|
|
mtable[frame="solid"] > mtr > mtd:last-child,
|
|
|
|
mtable[frame="dashed"] > mtr > mtd:last-child {
|
2016-05-13 08:19:58 +03:00
|
|
|
padding-inline-end: 0.4em; /* framespacing.right (or left in rtl)*/
|
2002-01-25 10:03:43 +03:00
|
|
|
}
|
|
|
|
|
2014-06-18 14:57:00 +04:00
|
|
|
mtable[rowspacing] > mtr > mtd,
|
|
|
|
mtable[columnspacing] > mtr > mtd,
|
|
|
|
mtable[framespacing] > mtr > mtd {
|
|
|
|
/* Spacing handled outside of CSS */
|
|
|
|
padding: 0px;
|
|
|
|
}
|
|
|
|
|
2002-01-08 05:15:23 +03:00
|
|
|
/**************************************************************************/
|
2014-04-24 23:30:00 +04:00
|
|
|
/* This rule is used to give a style context suitable for nsMathMLChars.
|
|
|
|
We don't actually style -moz-math-anonymous by default. */
|
2009-12-11 10:37:40 +03:00
|
|
|
/*
|
2003-08-05 06:07:14 +04:00
|
|
|
::-moz-math-anonymous {
|
2000-07-10 17:58:27 +04:00
|
|
|
}
|
2009-12-11 10:37:40 +03:00
|
|
|
*/
|
2002-07-01 13:51:32 +04:00
|
|
|
|
2007-12-01 13:11:44 +03:00
|
|
|
/**********************************************************************/
|
|
|
|
/* This is used when wrapping non-MathML inline elements inside math. */
|
2007-04-21 01:27:02 +04:00
|
|
|
*|*::-moz-mathml-anonymous-block {
|
2007-12-01 13:11:44 +03:00
|
|
|
display: inline-block !important;
|
2007-04-21 01:27:02 +04:00
|
|
|
position: static !important;
|
2008-03-07 06:47:11 +03:00
|
|
|
text-indent: 0;
|
2007-04-21 01:27:02 +04:00
|
|
|
}
|
2008-01-09 12:38:28 +03:00
|
|
|
|
2014-01-14 18:39:50 +04:00
|
|
|
/**************************************************************************/
|
|
|
|
/* Controlling Displaystyle and Scriptlevel */
|
|
|
|
/**************************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
http://www.w3.org/Math/draft-spec/chapter3.html#presm.scriptlevel
|
|
|
|
|
|
|
|
The determination of -moz-math-display for <math> involves the displaystyle
|
|
|
|
and display attributes. See the <math> section above.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
Map mstyle@displaystyle to -moz-math-display.
|
|
|
|
*/
|
|
|
|
mstyle[displaystyle="false"] {
|
|
|
|
-moz-math-display: inline;
|
|
|
|
}
|
|
|
|
mstyle[displaystyle="true"] {
|
|
|
|
-moz-math-display: block;
|
|
|
|
}
|
2008-01-09 12:38:28 +03:00
|
|
|
|
2014-01-14 18:39:50 +04:00
|
|
|
/* munder, mover and munderover change the scriptlevels of their children
|
|
|
|
using -moz-math-increment-script-level because regular CSS rules are
|
|
|
|
insufficient to control when the scriptlevel should be incremented. All other
|
|
|
|
cases can be described using regular CSS, so we do it this way because it's
|
|
|
|
more efficient and less code. */
|
|
|
|
:-moz-math-increment-script-level { -moz-script-level: +1; }
|
2008-01-09 12:38:28 +03:00
|
|
|
|
2014-01-14 18:39:50 +04:00
|
|
|
/*
|
|
|
|
The mfrac element sets displaystyle to "false", or if it was already false
|
|
|
|
increments scriptlevel by 1, within numerator and denominator.
|
|
|
|
*/
|
|
|
|
mfrac > * {
|
|
|
|
-moz-script-level: auto;
|
|
|
|
-moz-math-display: inline;
|
|
|
|
}
|
2008-01-09 12:38:28 +03:00
|
|
|
|
2014-01-14 18:39:50 +04:00
|
|
|
/*
|
|
|
|
The mroot element increments scriptlevel by 2, and sets displaystyle to
|
|
|
|
"false", within index, but leaves both attributes unchanged within base.
|
|
|
|
The msqrt element leaves both attributes unchanged within its argument.
|
|
|
|
*/
|
|
|
|
mroot > :not(:first-child) {
|
|
|
|
-moz-script-level: +2;
|
|
|
|
-moz-math-display: inline;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
The msub element [...] increments scriptlevel by 1, and sets displaystyle to
|
|
|
|
"false", within subscript, but leaves both attributes unchanged within base.
|
|
|
|
|
|
|
|
The msup element [...] increments scriptlevel by 1, and sets displaystyle to
|
|
|
|
"false", within superscript, but leaves both attributes unchanged within
|
|
|
|
base.
|
|
|
|
|
|
|
|
The msubsup element [...] increments scriptlevel by 1, and sets displaystyle
|
|
|
|
to "false", within subscript and superscript, but leaves both attributes
|
|
|
|
unchanged within base.
|
|
|
|
|
|
|
|
The mmultiscripts element increments scriptlevel by 1, and sets displaystyle
|
|
|
|
to "false", within each of its arguments except base, but leaves both
|
|
|
|
attributes unchanged within base.
|
|
|
|
*/
|
2008-01-09 12:38:28 +03:00
|
|
|
msub > :not(:first-child),
|
|
|
|
msup > :not(:first-child),
|
|
|
|
msubsup > :not(:first-child),
|
2014-01-14 18:39:50 +04:00
|
|
|
mmultiscripts > :not(:first-child) {
|
|
|
|
-moz-script-level: +1;
|
|
|
|
-moz-math-display: inline;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
The munder element [...] always sets displaystyle to "false" within the
|
|
|
|
underscript, but increments scriptlevel by 1 only when accentunder is
|
|
|
|
"false". Within base, it always leaves both attributes unchanged.
|
|
|
|
|
|
|
|
The mover element [...] always sets displaystyle to "false" within
|
|
|
|
overscript, but increments scriptlevel by 1 only when accent is "false".
|
|
|
|
Within base, it always leaves both attributes unchanged.
|
|
|
|
|
|
|
|
The munderover [..] always sets displaystyle to "false" within underscript
|
|
|
|
and overscript, but increments scriptlevel by 1 only when accentunder or
|
|
|
|
accent, respectively, are "false". Within base, it always leaves both
|
|
|
|
attributes unchanged.
|
|
|
|
*/
|
|
|
|
munder > :not(:first-child),
|
|
|
|
mover > :not(:first-child),
|
|
|
|
munderover > :not(:first-child) {
|
|
|
|
-moz-math-display: inline;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
The displaystyle attribute is allowed on the mtable element to set the
|
|
|
|
inherited value of the attribute. If the attribute is not present, the
|
|
|
|
mtable element sets displaystyle to "false" within the table elements.
|
|
|
|
*/
|
|
|
|
mtable { -moz-math-display: inline; }
|
|
|
|
mtable[displaystyle="true"] { -moz-math-display: block; }
|
|
|
|
|
|
|
|
/*
|
|
|
|
The mscarries element sets displaystyle to "false", and increments
|
|
|
|
scriptlevel by 1, so the children are typically displayed in a smaller font.
|
|
|
|
XXXfredw: This element is not implemented yet. See bug 534967.
|
|
|
|
mscarries {
|
|
|
|
-moz-script-level: +1;
|
|
|
|
-moz-math-display: inline;
|
|
|
|
}
|
|
|
|
*/
|
2014-12-07 10:39:00 +03:00
|
|
|
|
2015-02-09 13:19:00 +03:00
|
|
|
/* "The mphantom element renders invisibly, but with the same size and other
|
|
|
|
dimensions, including baseline position, that its contents would have if
|
|
|
|
they were rendered normally.".
|
|
|
|
Also, we do not expose the <mphantom> element to the accessible tree
|
|
|
|
(see bug 1108378). */
|
2014-12-07 10:39:00 +03:00
|
|
|
mphantom {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|