HTML and CSS Reference
In-Depth Information
<number> | none
Initial value:
Applies to:
All elements
Computed value:
Same as declared value
Defines an aspectvaluefor the element, which is used to scale fonts such that they more
closely match each other in cases where fallback fonts are used. The proper aspect value for a
font is its true x-height divided by its font size.
How font-size-adjust actually works is to size fonts according to their x-height, which
is to say according to the height of lowercase letters. For example, consider a hypothetical
font (let's call it “CSSType”) that, when set to a font size of 100 pixels, has an x-height of 60
pixels; that is, its lowercase “x” letterform is 60 pixels tall. The appropriate font-size-ad-
just value for CSSType is thus 0.6. Declaring:
p {font: 20px "CSSType", sans-serif;
font-size-adjust: 0.6;}
…means that paragraph text should be sized so that lowercase letters are 12 pixels tall (20 ×
0.6 = 12), nomatterwhatfontfamilyisused. If CSSType is unavailable and the user agent
falls back to (for example) Helvetica, the Helvetica text will be sized so that lowercase letters
are 12 pixels tall and the uppercase letters will be whatever size results. Since the aspect value
of Helvetica is 0.53, its uppercase letters will be 22.6 pixels tall (or a rounded-off value, if the
user agent can't handle fractional pixels). If some other sans-serif font is used and its aspect
Search WWH ::

Custom Search