Path: blob/main/files/en-us/web/mathml/attribute/values/index.md
6516 views
------MathML-specific types
In addition to CSS data types, some MathML attributes accept the following types:
<unsigned-integer>: An<integer>, whose first character is neither U+002D HYPHEN-MINUS character (-) nor U+002B PLUS SIGN (+); for example1234.<boolean>: A stringtrueorfalserepresenting a boolean value.
Legacy MathML lengths
{{deprecated_header}}
Instead of <length-percentage>, MathML used to define its own type to describe lengths. Accepted values included non-zero unitless length values (e.g. 5 to mean 500%), values containing numbers ending with a dot (e.g. 34.px), or named spaces (e.g. thinmathspace). For compatibility reasons, it is recommended to replace non-zero unitless length values with equivalent <percentage> values, to remove unnecessary dots in numbers, and to use the following replacement for named lengths:
Units
| Unit | Description |
|---|---|
em | {{ Cssxref("font-size", "Font-relative") }} unit |
ex | {{ Cssxref("font-size", "Font-relative") }} unit. (The "x"-height of the element, 1ex ≈ 0.5em in many fonts) |
px | Pixels |
in | Inches (1 inch = 2.54 centimeters) |
cm | Centimeters |
mm | Millimeters |
pt | Points (1 point = 1/72 inch) |
pc | Picas (1 pica = 12 points) |
% | Percentage of the default value. |
Constants
| Constant | Value |
|---|---|
veryverythinmathspace | 1/18em |
verythinmathspace | 2/18em |
thinmathspace | 3/18em |
mediummathspace | 4/18em |
thickmathspace | 5/18em |
verythickmathspace | 6/18em |
veryverythickmathspace | 7/18em |
negativeveryverythinmathspace | -1/18em |
negativeverythinmathspace | -2/18em |
negativethinmathspace | -3/18em |
negativemediummathspace | -4/18em |
negativethickmathspace | -5/18em |
negativeverythickmathspace | -6/18em |
negativeveryverythickmathspace | -7/18em |
Browser compatibility
{{Compat}}