Shorthand notation attributes - font
Tests parsing of
font shorthand
attribute.
2003-07-25
:
This is a surrounding text. Its traits are as follows:
font-family=""
, font-size=""
,
font-size-adjust=""
, font-weight=""
,
font-style="
, font-stretch=""
,
font-variant=""
, line-height=""
.
None of these properties should leak into the test box.
This is a test box. The font is set to "". The
surrounding text should have no impact on the look of the font.
The expected values for single traits are given in the list
on the left.
This is a test box: font="", font-family="", font-size="",
font-size-adjust="", font-weight="",
font-style="", font-stretch="",
font-variant="", line-height="". This text should be same as surrounding text.
The surrounding text continues, with the same traits as above
the test box.
Shorthand notation attributes - font
Font
is an all-in-one property for specifying
a nearly complete set of font-related traits, namely:
font-family
font-size
font-weight
font-style
font-variant
line-height
font-size-adjust
font-stretch
Once applied, the shorthard sets all these values
to their default values. Be careful: silently overriding
line-height
or font-size-adjust
by this property can easily give rise to confusion.
In what follows, we test several examples of font
values and see their interation with inherited font traits. The
block of text that containg attributes being tested is marked
by a light gray background. The expected trait values for the
text are listed on the left.
It is still unclear whether specifying normal
trait
values inside the shorthand make sense. We have included some
tests on this; however, implementations that don't support
them can hardly be blamed for that.