Files
Mozilla/mozilla/layout/mathml/content/src/mathml.css
rbs%maths.uq.edu.au 0d04e79f72 typos
git-svn-id: svn://10.0.0.236/trunk@112879 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-25 21:57:47 +00:00

499 lines
10 KiB
CSS

/*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla MathML Project.
*
* The Initial Developer of the Original Code is The University Of
* Queensland. Portions created by The University Of Queensland are
* Copyright (C) 1999 The University Of Queensland. All Rights Reserved.
*
* Contributor(s):
* Roger B. Sidje <rbs@maths.uq.edu.au>
*/
/*******************************************************/
/* namespace for MathML elements */
/*******************************************************/
@namespace url(http://www.w3.org/1998/Math/MathML);
/*******************************************************/
/* <math> - outermost math element */
/*******************************************************/
math {
display: inline;
font-size: inherit;
font-style: normal;
font-family: CMSY10, Symbol, Times, Lucida Sans Unicode, MT Extra, Math1, Math2, Math3, Math4, Math5, serif;
}
math[mode="inline"], math[display="inline"] {
display: inline;
}
math[mode="display"], math[display="block"] {
display: block;
text-align: -moz-center;
}
:-moz-math-inline {
display: inline;
}
/*******************************************************/
/* attributes common to all tags */
/*******************************************************/
[fontstyle="normal"] {
font-style: normal;
}
[fontstyle="italic"] {
font-style: italic;
}
[fontweight="normal"] {
font-weight: normal;
}
[fontweight="bold"] {
font-weight: bold;
}
[fontsize="xx-small"] {
font-size: xx-small;
}
[fontsize="x-small"] {
font-size: x-small;
}
[fontsize="small"], [fontsize="smaller"] {
font-size: smaller;
}
[fontsize="medium"] {
font-size: medium;
}
[fontsize="large"] {
font-size: large;
}
[fontsize="larger"] {
font-size: larger;
}
[fontsize="x-large"] {
font-size: x-large;
}
[fontsize="xx-large"] {
font-size: xx-large;
}
/*******************************************************/
/* tags with generated content */
/*******************************************************/
ms {
display: inline;
}
ms:before {
content: open-quote;
}
ms:after {
content: close-quote;
}
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;
}
/*******************************************************/
/* mtable and its related tags */
/*******************************************************/
mtable {
display: table;
}
mtable[frame="none"] {
border: none;
}
mtable[frame="solid"] {
border: solid thin;
}
mtable[frame="dashed"] {
border: dashed thin;
}
mtr {
display: table-row;
}
mtd {
display: table-cell;
vertical-align: baseline;
text-align: -moz-center;
white-space: nowrap;
}
/***********************/
/* -- mtd: columnalign */
mtd[columnalign="left"] {
text-align: left;
}
mtd[columnalign="right"] {
text-align: right;
}
mtd[columnalign="center"] {
text-align: -moz-center;
}
/********************/
/* -- mtd: rowalign */
mtd[rowalign="top"] {
vertical-align: top;
}
mtd[rowalign="bottom"] {
vertical-align: bottom;
}
mtd[rowalign="center"] {
vertical-align: middle;
}
mtd[rowalign="baseline"] {
vertical-align: baseline;
}
/* -- not yet supported --
mtd[rowalign="axis"] {
vertical-align: mathline;
}
*/
/**********************************************************************/
/* rules to achieve the default spacing between cells. The back-end code
will set the internal attributes depending on the cell's position.
These rules are hard-coded, the comments indicate what would be
desirable if the style data could be changed on the fly to pick
the values that users may set with the attributes of <mtable> */
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 */
mtd[-moz-math-firstrow="true"] {
padding-top: 0ex;
}
mtd[-moz-math-lastrow="true"] {
padding-bottom: 0ex;
}
mtd[-moz-math-firstcolumn="true"] {
padding-left: 0em;
}
mtd[-moz-math-lastcolumn="true"] {
padding-right: 0em;
}
/* re-instate the spacing if the table has a surrounding frame */
mtable[frame="solid"] > mtr > mtd[-moz-math-firstrow="true"],
mtable[frame="dashed"] > mtr > mtd[-moz-math-firstrow="true"] {
padding-top: 0.5ex; /* framespacing.top */
}
mtable[frame="solid"] > mtr > mtd[-moz-math-lastrow="true"],
mtable[frame="dashed"] > mtr > mtd[-moz-math-lastrow="true"] {
padding-bottom: 0.5ex; /* framespacing.bottom */
}
mtable[frame="solid"] > mtr > mtd[-moz-math-firstcolumn="true"],
mtable[frame="dashed"] > mtr > mtd[-moz-math-firstcolumn="true"] {
padding-left: 0.4em; /* framespacing.left */
}
mtable[frame="solid"] > mtr > mtd[-moz-math-lastcolumn="true"],
mtable[frame="dashed"] > mtr > mtd[-moz-math-lastcolumn="true"] {
padding-right: 0.4em; /* framespacing.right */
}
/**********************************************************************/
/* internal settings to support 'rowlines' and 'columnlines'. To
achieve the recommended behavior, the back-end code will avoid setting
unsuitable rules on the cells on the first row and the first column.
In general, however, authors can use the 'border' property of CSS to
achieve varying effects down to the level of the table cell. */
mtd[-moz-math-rowline="none"] {
border-top: none;
}
mtd[-moz-math-rowline="solid"] {
border-top: solid thin;
}
mtd[-moz-math-rowline="dashed"] {
border-top: dashed thin;
}
mtd[-moz-math-columnline="none"] {
border-left: none;
}
mtd[-moz-math-columnline="solid"] {
border-left: solid thin;
}
mtd[-moz-math-columnline="dashed"] {
border-left: dashed thin;
}
/*******************************************************/
/* style switching during frame construction */
/*******************************************************/
/* change of style depending on the context of <mi> */
mi {
font-style: italic;
}
[-moz-math-font-style="normal"] {
font-style: normal;
}
/* change of size induced by changing the scriptlevel */
[-moz-math-font-size="+1"] {
font-size: 71%;
}
[-moz-math-font-size="+2"] {
font-size: 50%;
}
[-moz-math-font-size="+3"] {
font-size: 36%;
}
[-moz-math-font-size="+4"] {
font-size: 25%;
}
[-moz-math-font-size="+5"] {
font-size: 18%;
}
[-moz-math-font-size="scriptminsize"] {
font-size: 8pt;
}
[-moz-math-font-size="-1"] {
font-size: 141%;
}
[-moz-math-font-size="-2"] {
font-size: 200%;
}
[-moz-math-font-size="-3"] {
font-size: 283%;
}
[-moz-math-font-size="-4"] {
font-size: 400%;
}
[-moz-math-font-size="-5"] {
font-size: 566%;
}
/**************************************************************************/
/* Style used for stretchy symbols *must* be normal to avoid misaligments */
/* By leaving the font-family empty, the MathML engine will use the value
provided by the mathfont-family property in the mathfont.properties file
or the value of the user's pref("font.mathfont-family", "...").
Authors can make elements on a document to be stretched with different
fonts, e.g.,
To request the use of TeX fonts, you can do:
<mo myfonts="tex">...</mo> with the associated CSS declaration
mo[myfonts="tex"]:-moz-math-font-style-stretchy {
font-family: CMSY10, CMEX10;
}
To request the use of Mathematica fonts, you can do:
<mo myfonts="mathematica">...</mo> with the associated CSS declaration
mo[myfonts="mathematica"]:-moz-math-font-style-stretchy {
font-family: Math1, Math2, Math4;
}
Note that like other fonts in the document, users can override this by
clicking the pref to override document fonts.
/**************************************************************************/
:-moz-math-font-style-stretchy {
font-style: normal;
font-family: serif;
/* background-color: #3C6; */
}
:-moz-math-font-style-anonymous {
}
/**************************************************************************/
/* ALL THESE ARE USED FOR DEMO AND DEBUGGING PURPOSES ONLY */
/* They may go away at any time */
/**************************************************************************/
[background="yellow"] {
background-color: yellow;
}
/*
maction:hover {
outline: thick solid black;
border: 1px dotted black;
}
*/
maction {
background-color: yellow;
/* border: 1px solid black; */
}
maction[actiontype="restyle#background"] {
background-color: #3C6;
border: 1px dotted red;
}
maction[actiontype="restyle#zoom"] {
font-size: 40pt;
}
/*
mmultiscripts {
background-color: yellow;
}
*/
/*
mtext {
color: purple;
border: 1px solid purple;
}
*/
/*
mstyle {
background-color: yellow;
border: 1px solid black;
}
*/
ms {
color: blue;
/*
background-color: yellow;
border: 1px solid black;
*/
}
/*
mpadded {
background-color: yellow;
border: 1px solid black;
}
*/
/*
mspace {
}
*/
/*
msqrt, mroot {
border: 1px dotted red;
background-color: green;
}
*/
/*
mrow {
border: 1px solid black;
font-style: italic;
}
*/
/*
mphantom {
}
*/
/*
mfrac {
background-color: blue;
font-size: smaller;
border: 1px dotted black;
}
*/
/*
msub, msup {
background-color: yellow;
border: 1px dotted black;
font-size: small;
}
*/
/*
mclip {
color: red;
font-style: normal;
border: 1px dashed green;
background-color: yellow;
}
*/
/*
mn {
border: 1px solid black;
}
*/
mi {
color: red;
/* font-style: normal; */
/* border: 1px dashed green; */
/* background-color: yellow; */
}
/*
mo {
font-family: CMEX10, Math1, Math3, Math4;
font-style: normal;
border: 1px solid black;
background-color: lightyellow;
}
*/
/*
munder, mover, munderover {
background-color: yellow;
border: 1px solid black;
}
*/