font-variant-caps property CSS Reference



Definition and Usage

Specifies control over capitalized forms.

Name: font-variant-caps
Value: normal | small-caps | all-small-caps | petite-caps | all-petite-caps | titling-caps | unicase
Initial: normal
Applies to: all elements
Inherited: yes
Percentages: N/A
Media: visual
Computed value: as specified

Syntax

font-variant-caps : normal | small-caps | all-small-caps | petite-caps | all-petite-caps | titling-caps | unicase 

Values

normal
None of the features listed below are enabled.
small-caps
Enables display of small capitals (OpenType feature: smcp). Small-caps glyphs typically use the form of uppercase letters but are reduced to the size of lowercase letters.
all-small-caps
Enables display of small capitals for both upper and lowercase letters (OpenType features: c2sc, smcp).
petite-caps
Enables display of petite capitals (OpenType feature: pcap).
all-petite-caps
Enables display of petite capitals for both upper and lowercase letters (OpenType features: c2pc, pcap).
titling-caps
Enables display of titling capitals (OpenType feature: titl). Uppercase letter glyphs are often designed for use with lowercase letters. When used in all uppercase titling sequences they can appear too strong. Titling capitals are designed specifically for this situation.
unicase
Enables display of mixture of small capitals for uppercase letters with normal lowercase letters (OpenType feature: unic).

For backwards compatibility with CSS 2.1, if 'small-caps' or 'all-small-caps' is specified but small-caps glyphs are not available for a given font, user agents should simulate a small-caps font, for example by taking a normal font and replacing the lowercase letters by scaled uppercase characters (and also uppercase letters in the case of 'all-small-caps'). The availability of these glyphs is based on whether a given feature is defined or not in the feature list of the font. User agents can optionally decide this on a per-script basis.

As a last resort, unscaled uppercase letter glyphs in a normal font may replace glyphs in a small-caps font so that the text appears in all uppercase letters. If either 'petite-caps' or 'all-petite-caps' is specified for a font that doesn't support these features, the property behaves as if 'small-caps' or 'all-small-caps', respectively, had been specified. If 'titling-caps' is specified with a font that does not support these features, this property has no visible effect. For scripts that lack uppercase and lowercase letters, 'small-caps', 'all-small-caps', 'petite-caps', 'all-petite-caps' and 'unicase' have no visible effect.


Examples

blockquote            { font-style: italic; }
blockquote:first-line { font-variant: small-caps; }
<blockquote>I'll be honor-bound to slap them like a haddock.</blockquote>

Relative articles