<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="../../../Math/XSL/mathml.xsl"?>

<!DOCTYPE html
  SYSTEM "mathml.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <title>Sample CSS Style Sheet for MathML
</title>
      <style type="text/css">
code           { font-family: monospace; }

div.constraint,
div.issue,
div.note,
div.notice     { margin-left: 2em; }

li p           { margin-top: 0.3em;
                 margin-bottom: 0.3em; }

div.exampleInner pre { margin-left: 1em;
                       margin-top: 0em; margin-bottom: 0em}
div.exampleOuter {border: 4px double gray;
                  margin: 0em; padding: 0em}
div.exampleInner { background-color: #d5dee3;
                   border-top-width: 4px;
                   border-top-style: double;
                   border-top-color: #d3d3d3;
                   border-bottom-width: 4px;
                   border-bottom-style: double;
                   border-bottom-color: #d3d3d3;
                   padding: 4px; margin: 0em }
div.exampleWrapper { margin: 4px }
div.exampleHeader { font-weight: bold;
                    margin: 4px}

  .error { color: red }
  .minitoc { border-style: solid;
             border-color: #0050B2; 
             border-width: 1px ; }
  .attention { border-style: solid; 
               border-width: 1px ; 
               color: #5D0091;
               background: #F9F5DE; 
               border-color: red;
               margin-left: 1em;
               margin-right: 1em;
               margin-top: 0.25em;
               margin-bottom: 0.25em; }

  .attribute-Name { background: #F9F5C0; }
  .method-Name { background: #C0C0F9; }
  .IDL-definition { border-style: solid; 
               border-width: 1px ; 
               color: #001000;
               background: #E0FFE0; 
               border-color: #206020;
               margin-left: 1em;
               margin-right: 1em;
               margin-top: 0.25em;
               margin-bottom: 0.25em; }
  .baseline {vertical-align: baseline}

  #eqnoc1 {width: 10%}
  #eqnoc2 {width: 80%; text-align: center; }
  #eqnoc3 {width: 10%; text-align: right; }
          
.h3style {
  text-align: left;
  font-family: sans-serif;
  font-weight: normal;
  color: #0050B2; 
  font-size: 125%;
}

  h4 { text-align: left;
       font-family: sans-serif;
       font-weight: normal;
       color: #0050B2; }
  h5 { text-align: left;
       font-family: sans-serif;
       font-weight: bold;
       color: #0050B2; } 

  th {background:  #E0FFE0;}

  p, blockquote, h4 { font-family: sans-serif; }
  dt, dd, dl, ul, li { font-family: sans-serif; }
  pre, code { font-family: monospace }




.mathml-render {
font-family: serif;
font-size: 130%;
border: solid 4px green;
padding-left: 1em;
padding-right: 1em;
}
</style>
      <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-WD.css"/>
   </head>
   <body>

      <h1>
         <a id="stylesheet">

         </a>G Sample CSS Style Sheet for MathML (Non-Normative)</h1><!-- TOP NAVIGATION BAR -->
      <div class="minitoc">

  Overview: <a href="overview.xml">Mathematical Markup Language (MathML) Version 2.0 (2nd Edition)
</a>
         <br class="html-compat"/>
  Previous: F <a href="appendixf.xml">Operator Dictionary</a>
         <br class="html-compat"/>
  Next: H <a href="appendixh.xml">Glossary</a>
         <br class="html-compat"/>
         <br class="html-compat"/>G <a href="appendixg.xml">Sample CSS Style Sheet for MathML (Non-Normative)</a>
         <br class="html-compat"/>
      </div>
      <div class="div1">
         <p>The Cascading Style Sheet sample given here is <em>not normative
</em>. It is provided 
as a guide to illustrate the sort of CSS style sheet rules which a MathML renderer should 
include in its default style sheet in order to comply with both the CSS and MathML 
specifications. In particular, there is a need to provide rules to prevent the descent of
CSS font rules into MathML expressions embedded in ambient text, and to provide support for
the <code>mathfamily
</code>, <code>mathslant
</code>, <code>mathweight
</code>, <code>mathsize
</code>, 
<code>mathcolor
</code> and <code>mathbackground
</code> attributes.
</p>
         <p>We expect that implementation experience will allow us to provide a more authoritative
default MathML style sheet in the future. In the interim, it is hoped that this illustrative
sample will be helpful.</p>
         <pre>


math, math[mode="inline"] {
  display: inline;
  font-family: CMSY10, CMEX10, Symbol, Times;
  font-style: normal;
}

math[mode="display"] {
  display: block;
  text-align: center;
  font-family: CMSY10, CMEX10, Symbol, Times;
  font-style: normal;
}

@media screen {  /* hide from old browsers */


/* Rules dealing with the various values of the "mathvariant" attribute: */

math *.[mathvariant="normal"] {
  font-family: "Times New Roman", Courier, Garamond, serif;
  font-weight: normal;
  font-style: normal;
}

math *.[mathvariant="bold"] {
  font-family: "Times New Roman", Courier, Garamond, serif;
  font-weight: bold;
  font-style: normal;
}

math *.[mathvariant="italic"] {
  font-family: "Times New Roman", Courier, Garamond, serif;
  font-weight: normal;
  font-style: italic;
}

math *.[mathvariant="bold-italic"] {
  font-family: "Times New Roman", Courier, Garamond, serif;
  font-weight: bold;
  font-style: italic;
}

math *.[mathvariant="double-struck"] {
  font-family: msbm;
  font-weight: normal;
  font-style: normal;
}

math *.[mathvariant="script"] {
  font-family: eusb;
  font-weight: normal;
  font-style: normal;
}

math *.[mathvariant="bold-script"] {
  font-family: eusb;
  font-weight: bold;
  font-style: normal;
}

math *.[mathvariant="fraktur"] {
  font-family: eufm;
  font-weight: normal;
  font-style: normal;
}

math *.[mathvariant="bold-fraktur"] {
  font-family: eufm;
  font-weight: bold;
  font-style: italic;
}

math *.[mathvariant="sans-serif"] {
  font-family: Arial, "Lucida Sans Unicode", Verdana, sans-serif;
  font-weight: normal;
  font-style: normal;
}

math *.[mathvariant="bold-sans-serif"] {
  font-family: Arial, "Lucida Sans Unicode", Verdana, sans-serif;
  font-weight: bold;
  font-style: normal;
}

math *.[mathvariant="sans-serif-italic"] {
  font-family: Arial, "Lucida Sans Unicode", Verdana, sans-serif;
  font-weight: normal;
  font-style: italic;
}

math *.[mathvariant="sans-serif-bold-italic"] {
  font-family: Arial, "Lucida Sans Unicode", Verdana, sans-serif;
  font-weight: bold;
  font-style: italic;
}

math *.[mathvariant="monospace"] {
  font-family: monospace
}


/* Rules dealing with "mathsize" attribute */

math *.[mathsize="small"] {
  font-size: 80%
}

math *.[mathsize="normal"] {
/*  font-size: 100%  - which is unnecessary */
}

math *.[mathsize="big"] {
  font-size:  125%
}

/*Set size values for the "base" children of script and limit schema to 
  distinguish them from the script or limit children:
*/

msub&gt;*:first-child[mathsize="big"],
msup&gt;*:first-child[mathsize="big"],
msubsup&gt;*:first-child[mathsize="big"],
munder&gt;*:first-child[mathsize="big"],
mover&gt;*:first-child[mathsize="big"],
munderover&gt;*:first-child[mathsize="big"],
mmultiscripts&gt;*:first-child[mathsize="big"],
mroot&gt;*:first-child[mathsize="big"] {
  font-size: 125%
}

msub&gt;*:first-child[mathsize="small"],
msup&gt;*:first-child[mathsize="small"],
msubsup&gt;*:first-child[mathsize="small"],
munder&gt;*:first-child[mathsize="small"],
mover&gt;*:first-child[mathsize="small"],
munderover&gt;*:first-child[mathsize="small"],
mmultiscripts&gt;*:first-child[mathsize="small"],
mroot&gt;*:first-child[mathsize="small"] {
  font-size: 80%
}

msub&gt;*:first-child,
msup&gt;*:first-child,
msubsup&gt;*:first-child,
munder&gt;*:first-child,
mover&gt;*:first-child,
munderover&gt;*:first-child,
mmultiscripts&gt;*:first-child,
mroot&gt;*:first-child {
  font-size: 100%
}

/*Set size values for the other children of script and limit schema (the 
  script and limit children) - include scriptlevel increment attribute?
*/

msub&gt;*[mathsize="big"],
msup&gt;*[mathsize="big"],
msubsup&gt;*[mathsize="big"],
munder&gt;*[mathsize="big"],
mover&gt;*[mathsize="big"],
munderover&gt;*[mathsize="big"],
mmultiscripts&gt;*[mathsize="big"],
math[display="inline"] mfrac&gt;*[mathsize="big"],
math *[scriptlevel="+1"][mathsize="big"] {
  font-size: 89%  /* (.71 times 1.25) */
}

msub&gt;* [mathsize="small"],
msup&gt;*[mathsize="small"],
msubsup&gt;*[mathsize="small"],
munder&gt;*[mathsize="small"],
mover&gt;*[mathsize="small"],
munderover&gt;*[mathsize="small"],
mmultiscripts&gt;*[mathsize="small"],
math[display="inline"] mfrac&gt;*[mathsize="small"],
math *[scriptlevel="+1"][mathsize="small"] {
  font-size: 57% /* (.71 times .80) */
}

msub&gt;*,
msup&gt;*,
msubsup&gt;*,
munder&gt;*,
mover&gt;*,
munderover&gt;*,
mmultiscripts&gt;*,
math[display="inline"] mfrac&gt;*,
math *[scriptlevel="+1"] {
  font-size: 71%
}

mroot&gt;*[mathsize="big"] {
  font-size: 62%  /* (.50 times 1.25) */
}

mroot&gt;*[mathsize="small"] {
  font-size: 40% /* (.50 times .80) */
}

mroot&gt;* {
  font-size: 50%
}

/* Set size values for other scriptlevel increment attributes  */

math *[scriptlevel="+2"][mathsize="big"] {
  font-size: 63%  /* (.71 times .71 times 1.25) */
}

math *[scriptlevel="+2"][mathsize="small"] {
  font-size: 36% /* (.71 times .71 times .71) */
}

math *[scriptlevel="+2"] {
  font-size: 50%   /* .71 times .71 */
}

math *.[mathcolor="green"] {
  color: green
}

math *.[mathcolor="black"] {
  color: black
}

math *.[mathcolor="red"] {
  color: red
}

math *.[mathcolor="blue"] {
  color: blue
}

math *.[mathcolor="olive"] {
   color: olive
}

math *.[mathcolor="purple"] {
   color: purple
}

math *.[mathcolor="teal"] {
   color: teal
}

math *.[mathcolor="aqua"] {
   color: aqua
}

math *.[mathcolor="gray"] {
   color: gray
}

math *.[mathbackground="blue"] {
   background-color: blue
}

math *.[mathbackground="green"] {
   background-color: green
}

math *.[mathbackground="white"] {
   background-color: white
}

math *.[mathbackground="yellow"] {
   background-color: yellow
}

math *.[mathbackground="aqua"] {
   background-color: aqua
}

} /* Close "@media screen" scope */

@media aural {  
}


</pre>
      </div>
      <div class="minitoc">

  Overview: <a href="overview.xml">Mathematical Markup Language (MathML) Version 2.0 (2nd Edition)
</a>
         <br class="html-compat"/>
  Previous:     F <a href="appendixf.xml">Operator Dictionary</a>
         <br class="html-compat"/>
  Next:     H <a href="appendixh.xml">Glossary</a>
      </div>
   </body>
</html>