Revision 34461 of <mpadded>

  • Revision slug: MathML/Element/mpadded
  • Revision title: mpadded
  • Revision id: 34461
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment remove labels, use new compat table; 138 words added, 109 words removed

Revision Content

Summary

The MathML <mpadded> element is used to add extra padding and to set the general adjustment of position and size of enclosed contents.

Attributes

class, id, style
Provided for use with stylesheets.
depth
Sets or increments the depth. Possible values: Any length or an increment/decrement (a length prefixed with "+" or "-") .
height
Sets or increments the height. Possible values: Any length or an increment/decrement (a length prefixed with "+" or "-") .
href
Used to set a hyperlink to a specified URI.
lspace
Sets or increments the horizontal position. Possible values: Any length or an increment/decrement (a length prefixed with "+" or "-") .
mathbackground
The background color. You can use #rgb, #rrggbb and HTML color names.
mathcolor
The text color. You can use #rgb, #rrggbb and HTML color names.
voffset
Sets or increments the vertical position. Possible values: Any length or an increment/decrement (a length prefixed with "+" or "-") .
width
Sets or increments the width. Possible values: Any length or an increment/decrement (a length prefixed with "+" or "-") .

Pseudo-units

It is possible to use the keywords "depth", "height", and "width" as a pseudo-unit for the attributes depth, height, lspace, voffset, and width. They represent each length of the same-named dimension. Prior to Gecko 7.0 {{ geckoRelease("7.0") }} the MathML2 pseudo-unit lspace was allowed, which is no longer present in the MathML3 Recommendation and has been removed now. 

Examples

<math>

  <mpadded height="+150px" width="100px" lspace="2height">
    <mi> x </mi>
    <mo> + </mo>
    <mi> y </mi>
  </mpadded>

</math>

Browser compatibility

{{ CompatibilityTable() }}

{{ CompatTableDesktop( ['Basic support', CompatNo(), CompatGeckoDesktop("1.0"), CompatNo(), CompatNo(), CompatNo()], ['href', CompatNo(), CompatGeckoDesktop("7.0"), CompatNo(), CompatNo(), CompatNo()], ['mathbackground', CompatNo(), CompatGeckoDesktop("2.0"), CompatNo(), CompatNo(), CompatNo()], ['mathcolor', CompatNo(), CompatGeckoDesktop("2.0"), CompatNo(), CompatNo(), CompatNo()], ['voffset', CompatNo(), CompatGeckoDesktop("7.0"), CompatNo(), CompatNo(), CompatNo()] ) }}

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

Specification

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

See also

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

Revision Source

<h2 id="Summary">Summary</h2>
<p>The MathML <code>&lt;mpadded&gt;</code> element is used to add extra padding and to set the general adjustment of position and size of enclosed contents.</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-depth">depth</dt> <dd>Sets or increments the depth. Possible values: Any <a href="/en/MathML/Attributes/Values#Lengths" title="en/MathML/Attributes/Values#Lengths">length</a> or an increment/decrement (a length prefixed with "+" or "-") .</dd> <dt id="attr-height">height</dt> <dd>Sets or increments the height. Possible values: Any <a href="/en/MathML/Attributes/Values#Lengths" title="en/MathML/Attributes/Values#Lengths">length</a> or an increment/decrement (a length prefixed with "+" or "-") .</dd> <dt id="attr-href">href</dt> <dd>Used to set a hyperlink to a specified URI.</dd> <dt id="attr-lspace">lspace</dt> <dd>Sets or increments the horizontal position. Possible values: Any <a href="/en/MathML/Attributes/Values#Lengths" title="en/MathML/Attributes/Values#Lengths">length</a> or an increment/decrement (a length prefixed with "+" or "-") .</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> <dt id="attr-mathcolor">mathcolor</dt> <dd>The text 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> <dt id="attr-voffset">voffset</dt> <dd>Sets or increments the vertical position. Possible values: Any <a href="/en/MathML/Attributes/Values#Lengths" title="en/MathML/Attributes/Values#Lengths">length</a> or an increment/decrement (a length prefixed with "+" or "-") .</dd> <dt id="attr-width">width</dt> <dd>Sets or increments the width. Possible values: Any <a href="/en/MathML/Attributes/Values#Lengths" title="en/MathML/Attributes/Values#Lengths">length</a> or an increment/decrement (a length prefixed with "+" or "-") .</dd>
</dl>
<h3 id="Pseudo-units">Pseudo-units</h3>
<p>It is possible to use the keywords <code>"depth</code>",<code> "height"</code>, and <code>"width"</code> as a pseudo-unit for the attributes <strong>depth</strong>, <strong>height</strong>, <strong>lspace</strong>, <strong>voffset</strong>, and <strong>width</strong>. They represent each length of the same-named dimension. Prior to Gecko 7.0 {{ geckoRelease("7.0") }} the MathML2 pseudo-unit <code>lspace</code> was allowed, which is no longer present in the MathML3 Recommendation and has been removed now. </p>
<h2 id="Examples">Examples</h2>
<pre class="brush: html">&lt;math&gt;

  &lt;mpadded height="+150px" width="100px" lspace="2height"&gt;
    &lt;mi&gt; x &lt;/mi&gt;
    &lt;mo&gt; + &lt;/mo&gt;
    &lt;mi&gt; y &lt;/mi&gt;
  &lt;/mpadded&gt;

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