CSS font-variant-position Property
Description
The font-variant-position
property is used to enable typographic subscript and superscript glyphs. These are alternate glyphs designed within the same em-box as default glyphs and are intended to be laid out on the same baseline as the default glyphs, with no resizing or repositioning of the baseline. They are explicitly designed to match the surrounding text and to be more readable without affecting the line height.
- Initial value
- normal
- Applies to
- All elements
- Inherited
- Yes
- Computed value
- As specified
- Animatable
- No
- JavaScript syntax
- object.style.fontVariantPosition
Syntax
font-variant-position: normal | sub | super
Values
- normalNone of the features listed below are enabled.
- subEnables display of subscript variants (OpenType feature: subs).
- superEnables display of superscript variants (OpenType feature: sups).
Example
<p class="normal">Normal!</p>
<p class="super">Super!</p>
<p class="sub">Sub!</p>
p {
display: inline;
}
.normal {
font-variant-position: normal;
}
.super {
font-variant-position: super;
}
.sub {
font-variant-position: sub;
}
Browser Support
The following table will show you the current browser support for the CSS font-variant-position
property.
Desktop | |||||
x | x | 34 | x | 9.1 |
Tablets / Mobile | |||||
x | 34 | x | 9.3 | x | x |
Last updated by CSSPortal on: 31st December 2023