Typography - Getting The Hang Of Typography

(lu) #1

You could also be very specific about the weight of your fonts, instead of
using the common regular and bold properties. CSS allows you to
specify font weight with values from 100 to 900 (i.e. 100 , 200 , 300 , etc.). If
you decide to use these, know that the 400 value represents the normal
weight, while 700 represents bold. If a font isn՚t given a weight, it will
default to its parent weight.


Another useful property, sadly supported only in Firefox for now, is font-
size-adjust, which allows you to specify an aspect ratio for when a fall-
back font is called. This way, if the substitute font is smaller than the
preferred one, the text՚s x-height will be preserved. A good explanation of
how font-size-adjust works can be found on the W3C Web site.


Dealing With White Space, Line Breaks And


Text Wrapping


Several CSS properties deal with these issues, but the specs are still in the
works (at the “Working Draft” stage).


White Space


The white-space property lets you specify a combination of properties
for which it serves as a shorthand: white-space-collapsing and
text-wrap. Here՚s a breakdown of what each property stands for:


normal
white-space-collapsing: collapse/text-wrap: normal


pre
white-space-collapsing: preserve/text-wrap: none

Free download pdf