mozilla

Revision 238437 of font-stretch

  • Revision slug: CSS/font-stretch
  • Revision title: font-stretch
  • Revision id: 238437
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{ CSSRef() }}

Summary

The font-stretch CSS property selects a normal, condensed, or extended face from a font family.

  • {{ Xref_cssinitial() }}: {{ Cssxref("normal") }}
  • Applies to: all elements
  • {{ Xref_cssinherited() }}: Yes
  • Media: {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }}: specified value

Syntax

font-stretch:  inherit | 
               ultra-condensed | extra-condensed | condensed | semi-condensed |
               normal | semi-expanded | expanded | extra-expanded | ultra-expanded

Values

normal
Specifies a normal font face.
semi-condensed, condensed, extra-condensed, ultra-condensed
Specifies a font face condensed than normal, with ultra-condensed as the most condensed.
semi-expanded, expanded, extra-expanded, ultra-expanded
Specifies a font face expanded than normal, with ultra-expanded as the most expanded.
h1 { font-stretch: extra-expanded }
p  { font-stretch: condensed }

Specifications

font-stretch was defined in CSS 2, but dropped in CSS 2.1 due lack of implementation experience. It's newly drafted in CSS 3.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{ CompatNo() }} {{ CompatGeckoDesktop("9.0") }} 9.0 {{ CompatNo() }} {{ CompatNo() }}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatNo() }} {{ CompatGeckoMobile("9.0") }} {{ CompatUnknown() }} {{ CompatNo() }} {{ CompatNo() }}

See also

  • {{ CSS_Reference:Fonts() }}

Revision Source

<p>{{ CSSRef() }}</p>
<h2 id="Summary">Summary</h2>
<p>The<code> font-stretch </code>CSS property selects a normal, condensed, or extended face from a font family.</p>
<ul class="cssprop">
  <li><dfn>{{ Xref_cssinitial() }}:</dfn> {{ Cssxref("normal") }}</li>
  <li><dfn>Applies to:</dfn> all elements</li>
  <li><dfn>{{ Xref_cssinherited() }}:</dfn> Yes</li>
  <li><dfn>Media:</dfn> {{ Xref_cssvisual() }}</li>
  <li><dfn>{{ Xref_csscomputed() }}:</dfn> specified value</li>
</ul>
<h2 id="Syntax">Syntax</h2>
<pre>font-stretch:  inherit | 
               ultra-condensed | extra-condensed | condensed | semi-condensed |
               normal | semi-expanded | expanded | extra-expanded | ultra-expanded
</pre>
<h3 id="Values">Values</h3>
<dl>
  <dt>
    normal</dt>
  <dd>
    Specifies a normal font face.</dd>
  <dt>
    semi-condensed, condensed, extra-condensed, ultra-condensed</dt>
  <dd>
    Specifies a font face condensed than normal, with ultra-condensed as the most condensed.</dd>
  <dt>
    semi-expanded, expanded, extra-expanded, ultra-expanded</dt>
  <dd>
    Specifies a font face expanded than normal, with ultra-expanded as the most expanded.</dd>
</dl>
<pre>h1 { font-stretch: extra-expanded }
p  { font-stretch: condensed }
</pre>
<h2 id="Specifications">Specifications</h2>
<p><code>font-stretch</code> was defined in CSS 2, but dropped in CSS 2.1 due lack of implementation experience. It's newly drafted in CSS 3.</p>
<ul>
  <li><a class="external" href="http://www.w3.org/TR/1998/REC-CSS2-19980512/fonts.html#font-styling" title="http://www.w3.org/TR/1998/REC-CSS2-19980512/fonts.html#font-styling">CSS 2 1998-05-12 Fonts #font-styling</a> Obsolete</li>
  <li><a class="external" href="http://dev.w3.org/csswg/css3-fonts/#font-stretch-prop" title="http://dev.w3.org/csswg/css3-fonts/#font-stretch-prop">CSS 3 Fonts #font-stretch</a> Editor's draft, handle with care!</li>
</ul>
<h2 id="Browser_compatibility">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 (WebKit)</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatGeckoDesktop("9.0") }}</td>
        <td>9.0</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("9.0") }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also">See also</h2>
<ul><li>{{ CSS_Reference:Fonts() }}</li></ul>
Revert to this revision