B.41. font-stretch

Many font families (Futura comes to mind) have not only different weights (e.g. normal, light, bold) and styles (e.g. normal, italic, oblique), but also different densities (e.g. normal, condensed, extended). This property lets you select the density of the font to be displayed in an element.

The CSS2 specification makes no mention of whether a browser should artificially condense or expand a font that does not have different density versions available; however, since most browsers do this for other font properties (e.g. font-style, font-weight, font-variant), this would not be unreasonable to expect. The property name certainly suggests that function.

Inherited: Yes

See also: Section B.37font

B.41.1. Value

One of 11 constants: 9 absolute and 2 relative.

The absolute constants are:

  • ultra-condensed

  • extra-condensed

  • condensed

  • semi-condensed

  • normal

  • semi-expanded

  • expanded

  • extra-expanded

  • ultra-expanded

The relative constants are:

  • narrower

  • wider

The relative constants take the font-stretch value of the parent element and sets the current element's value to the next narrower or wider value, respectively.

Initial value: normal

B.41.2. Compatibility

CSS Version: 2

Not supported by any currently-available browsers.

B.41.3. Example

This style rule sets any element of class languid to be displayed in an extra-expanded font:

.languid {
  font-stretch: extra-expanded;
}

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset