<mpadded>

  • Revision slug: MathML/Element/mpadded
  • Revision title: mpadded
  • Revision id: 34459
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment lspace was in MathML2; 10 words added, 3 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 {{ unimplemented_inline("534968") }}
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 {{ gecko_minversion_inline("2.0") }}
The background color. You can use #rgb, #rrggbb and HTML color names.
mathcolor {{ gecko_minversion_inline("2.0") }}
The text color. You can use #rgb, #rrggbb and HTML color names.
voffset {{ gecko_minversion_inline("7.0") }}
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() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{ CompatNo() }} {{ CompatGeckoDesktop("1.0") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
voffset attribute {{ CompatNo() }} {{ CompatGeckoDesktop("7.0") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatNo() }} {{ CompatGeckoMobile("1.9.2") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
voffset attribute {{ 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>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>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 {{ unimplemented_inline("534968") }}</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 {{ gecko_minversion_inline("2.0") }}</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 {{ gecko_minversion_inline("2.0") }}</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 {{ gecko_minversion_inline("7.0") }}</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>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>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>Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
<table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Chrome</th> <th>Firefox (Gecko)</th> <th>Internet Explorer</th> <th>Opera</th> <th>Safari</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatNo() }}</td> <td>{{ CompatGeckoDesktop("1.0") }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> </tr> <tr> <td><code>voffset</code> attribute</td> <td>{{ CompatNo() }}</td> <td>{{ CompatGeckoDesktop("7.0") }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> </tr> </tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Android</th> <th>Firefox Mobile (Gecko)</th> <th>IE Phone</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatNo() }}</td> <td>{{ CompatGeckoMobile("1.9.2") }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> </tr> <tr> <td><code>voffset</code> attribute</td> <td>{{ CompatNo() }}</td> <td>{{ CompatGeckoMobile("7.0") }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatNo() }}</td> </tr> </tbody>
</table>
</div>
<h2>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>See also</h2>
<ul> <li>{{ MathMLElement("mphantom") }}</li> <li>{{ MathMLElement("mspace") }}</li>
</ul>
Revert to this revision