Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
Note: The font-stretch property has now been renamed to font-width in the specifications. The name font-stretch has been kept as an alias for the font-width property. The new name font-width is not yet supported by any browsers.
The font-stretch CSS property selects a normal, condensed, or expanded face from a font.
font-stretch: condensed;
font-stretch: expanded;
font-stretch: ultra-expanded;
font-stretch: 50%;
font-stretch: 100%;
font-stretch: 150%;
<section class="default-example" id="default-example">
<p class="transition-all" id="example-element">
London. Michaelmas term lately over, and the Lord Chancellor sitting in
Lincoln's Inn Hall. Implacable November weather. As much mud in the streets
as if the waters had but newly retired from the face of the earth, and it
would not be wonderful to meet a Megalosaurus, forty feet long or so,
waddling like an elephantine lizard up Holborn Hill.
</p>
</section>
@font-face {
src: url("/shared-assets/fonts/LeagueMono-VF.ttf") format("truetype");
font-family: League;
font-style: normal;
font-weight: 400;
font-stretch: 50% 200%; /* Required by Chrome - allow 50% to 200% */
}
section {
font-size: 1.2em;
font-family: League, sans-serif;
}
/* <font-stretch-css3> keyword values */ font-stretch: normal; font-stretch: ultra-condensed; font-stretch: extra-condensed; font-stretch: condensed; font-stretch: semi-condensed; font-stretch: semi-expanded; font-stretch: expanded; font-stretch: extra-expanded; font-stretch: ultra-expanded; /* Percentage values */ font-stretch: 50%; font-stretch: 100%; font-stretch: 200%; /* Global values */ font-stretch: inherit; font-stretch: initial; font-stretch: revert; font-stretch: revert-layer; font-stretch: unset;
This property may be specified as a single <font-stretch-css3> keyword value or a single <percentage> value.
normalSpecifies a normal font face.
semi-condensed, condensed, extra-condensed, ultra-condensedSpecifies a more condensed font face than normal, with ultra-condensed as the most condensed.
semi-expanded, expanded, extra-expanded, ultra-expandedSpecifies a more expanded font face than normal, with ultra-expanded as the most expanded.
<percentage>A <percentage> value between 50% and 200% (inclusive). Negative values are not allowed for this property.
The table below shows the mapping between the <font-stretch-css3> keyword values and numeric percentages:
| Keyword | Percentage |
|---|---|
ultra-condensed | 50% |
extra-condensed | 62.5% |
condensed | 75% |
semi-condensed | 87.5% |
normal | 100% |
semi-expanded | 112.5% |
expanded | 125% |
extra-expanded | 150% |
ultra-expanded | 200% |
Some font families offer additional faces in which the characters are narrower than the normal face (condensed faces) or wider than the normal face (expanded faces).
You can use font-stretch to select a condensed or expanded face from such fonts. If the font you are using does not offer condensed or expanded faces, this property has no effect.
The face selected for a given value of font-stretch depends on the faces supported by the font in question. If the font does not provide a face that exactly matches the given value, then values less than 100% map to a narrower face, and values greater than or equal to 100% map to a wider face.
The table below demonstrates the effect of supplying various different percentage values of font-stretch on two different fonts:
| Initial value | normal |
|---|---|
| Applies to | all elements and text. It also applies to ::first-letter and ::first-line. |
| Inherited | yes |
| Computed value | as specified |
| Animation type | by computed value type |
font-width =
normal |
<percentage [0,∞]> |
ultra-condensed |
extra-condensed |
condensed |
semi-condensed |
semi-expanded |
expanded |
extra-expanded |
ultra-expanded
<p class="condensed">an elephantine lizard</p> <p class="normal">an elephantine lizard</p> <p class="expanded">an elephantine lizard</p>
@font-face {
src: url("https://mdn.github.io/shared-assets/fonts/LeagueMono-VF.ttf");
font-family: "LeagueMonoVariable";
font-style: normal;
font-stretch: 1% 500%; /* Required by Chrome */
}
p {
font:
1.5rem "LeagueMonoVariable",
sans-serif;
}
.condensed {
font-stretch: 50%;
}
.normal {
font-stretch: 100%;
}
.expanded {
font-stretch: 200%;
}
| Specification |
|---|
| CSS Fonts Module Level 4> # font-stretch-prop> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
font-stretch |
60Afont-stretch definition must be added to the @font-face before this property will function. |
12 | 9 | 47Afont-stretch definition must be added to the @font-face before this property will function. |
11 | 60Afont-stretch definition must be added to the @font-face before this property will function. |
9 | 44Afont-stretch definition must be added to the @font-face before this property will function. |
11 | 8.0Afont-stretch definition must be added to the @font-face before this property will function. |
60Afont-stretch definition must be added to the @font-face before this property will function. |
11 |
percentage |
62 | 18 | 61 | 49 | 11.1 | 62 | 61 | 46 | 11.3 | 8.0 | 62 | 11.3 |
font-stylefont-weightfont-stretch attribute
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/font-stretch