mozilla

Revision 294699 of <mphantom>

  • Revision slug: MathML/Element/mphantom
  • Revision title: mphantom
  • Revision id: 294699
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

Summary

The MathML <mphantom> element is rendered invisibly, but dimensions (such as height, width, and baseline position) are still kept.

Attributes

class, id, style
Provided for use with stylesheets.
mathbackground
The background color. You can use #rgb, #rrggbb and HTML color names.

Examples

Rendering: x+  z

<math>

<mrow>
  <mi> x </mi>
  <mo> + </mo> 
  <mphantom>
    <mi> y </mi>
    <mo> + </mo>
  </mphantom>
  <mi> z </mi>
</mrow>

</math>

Browser compatibility

{{ CompatibilityTable() }}

{{ CompatTableDesktop( ['Basic support', CompatNo(), CompatGeckoDesktop("1.0"), CompatNo(), "9.5", "5.1"], ['mathbackground', CompatNo(), CompatGeckoDesktop("2.0"), CompatNo(), CompatNo(), "5.1"] ) }}

{{ CompatTableMobile( ['Basic support', CompatNo(), CompatNo(), CompatGeckoMobile("1.0"), CompatNo(), CompatNo(), CompatNo()], ['mathbackground', CompatNo(), CompatNo(), CompatGeckoMobile("2.0"), CompatNo(), CompatNo(), CompatNo()] ) }}

Specification

  • {{ spec("http://www.w3.org/TR/MathML/chapter3.html#presm.mphantom","MathML 3.0 Presentation Markup mphantom", "REC") }}

See also

  • {{ MathMLElement("mspace") }}
  • {{ MathMLElement("mpadded") }}

Revision Source

<h2 id="Summary">Summary</h2>
<p>The MathML <code>&lt;mphantom&gt;</code> element is rendered invisibly, but dimensions (such as height, width, and baseline position) are still kept.</p>
<h2 id="Attributes">Attributes</h2>
<dl>
  <dt id="attr-class-id-style">
    class, id, style</dt>
  <dd>
    Provided for use with <a href="/en/CSS" title="en/CSS/">stylesheets</a>.</dd>
  <dt id="attr-mathbackground">
    mathbackground</dt>
  <dd>
    The background color. You can use <code>#rgb</code>, <code>#rrggbb</code> and <a href="/en/CSS/color_value#HTML.2fSVG.2fX11.c2.a0_Color_Keywords" title="en/CSS/color value#HTML.2fSVG.2fX11.c2.a0 Color Keywords">HTML color names</a>.</dd>
</dl>
<h2 id="Examples">Examples</h2>
<p>Rendering: <img alt="x+  z" src="/@api/deki/files/4852/=mphantom.png" style="vertical-align: middle; margin-left: 10px;" /></p>
<pre class="brush: html">
&lt;math&gt;

&lt;mrow&gt;
  &lt;mi&gt; x &lt;/mi&gt;
  &lt;mo&gt; + &lt;/mo&gt; 
  &lt;mphantom&gt;
    &lt;mi&gt; y &lt;/mi&gt;
    &lt;mo&gt; + &lt;/mo&gt;
  &lt;/mphantom&gt;
  &lt;mi&gt; z &lt;/mi&gt;
&lt;/mrow&gt;

&lt;/math&gt;
</pre>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<p>{{ CompatTableDesktop( ['Basic support', CompatNo(), CompatGeckoDesktop("1.0"), CompatNo(), "9.5", "5.1"], ['mathbackground', CompatNo(), CompatGeckoDesktop("2.0"), CompatNo(), CompatNo(), "5.1"] ) }}</p>
<p>{{ CompatTableMobile( ['Basic support', CompatNo(), CompatNo(), CompatGeckoMobile("1.0"), CompatNo(), CompatNo(), CompatNo()], ['mathbackground', CompatNo(), CompatNo(), CompatGeckoMobile("2.0"), CompatNo(), CompatNo(), CompatNo()] ) }}</p>
<h2 id="Specification">Specification</h2>
<ul>
  <li>{{ spec("http://www.w3.org/TR/MathML/chapter3.html#presm.mphantom","MathML 3.0 Presentation Markup mphantom", "REC") }}</li>
</ul>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{ MathMLElement("mspace") }}</li>
  <li>{{ MathMLElement("mpadded") }}</li>
</ul>
Revert to this revision