mozilla
Your Search Results

    font-variant Redirect 1

    There was a scripting error on this page. While it is being addressed by site editors, you can view partial content below.

    {{ CSSRef }}

    Summary

    The font-variant CSS property selects a normal, or small-caps face from a font family. Setting font-variant is also possible by using the font shorthand.

    Syntax

    Formal syntax: normal | small-caps 
    font-variant: normal
    font-variant: small-caps
    
    font-variant: inherit
    

    Values

    normal
    Specifies a normal font face.
    small-caps
    Specifies a font that is labeled as a small-caps font. If a small-caps font is not available, Mozilla (Firefox) and other browsers will simulate a small-caps font, i.e. by taking a normal font and replacing the lowercase letters by scaled uppercase characters.

    The small-caps values takes into account language-specific case mapping rules, like:

    • In Turkic languages, like Turkish (tr), Azerbaijani (az), Crimean Tatar (crh), Volga Tatar (tt), and Bashkir (ba), there are two kinds of i, with and without the dot, and two case pairings: i/İ and ı/I.
    • In German (de), the ß becomes SS in uppercase.
    • In Greek (el), vowels lose their accent when the whole word is in uppercase (ά/Α), except for the disjunctive eta (ή/Ή). Also, diphthongs with an accent on the first vowel lose the accent and gain a diacritic on the second vowel (άι/ΑΪ).

    The language is defined by the lang HTML attribute or the xml:lang XML attribute.

    Support for these specific cases vary from one browser to the other, so check the browser compatibility table.

    Examples

    p {
      font-variant: small-caps;
    }

    Specifications

    Specification Status Comment
    CSS Fonts Module Level 3
    The definition of 'font-variant' in that specification.
    Candidate Recommendation Extends the property (this is not yet reflected in this article)
    CSS Level 2 (Revision 1)
    The definition of 'font-variant' in that specification.
    Recommendation No change.
    CSS Level 1
    The definition of 'font-variant' in that specification.
    Recommendation  

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
    Basic support 1.0 1.0 (1.0) 4.0 3.5 1.0 (85)
    ßSS ? 1.0 (1.7 or earlier) ? ? ?
    iİ and ıI Not supported 14 (14) ? ? Not supported
    Greek accented letters Not supported 15 (15) Not supported Not supported Not supported
    Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
    Basic support ? ? ? ? ?
    ßSS ? ? ? ? ?
    iİ and ıI Not supported 14 (14) ? ? Not supported
    Greek accented letters Not supported Not supported Not supported Not supported Not supported

    See also

    Document Tags and Contributors

    Contributors to this page: Sheppy
    Last updated by: Sheppy,