Since em fonts are meausured using em unit, they have a much better relationship with different
devices. The em utility classes run from
0
and
1-6
. The font sizes that
fall under the category of zero
"0"
are known as the decimal fonts while others which run from 1 to 6
are the digit relative fonts.
Decimal Only Fonts
Decimal only fonts are em fonts that have only the the decimal unit identifiers without a digit before them (ie
-d
).
This is because the zero digit is ignored. These fonts run from
font-em-d1
to
font-em-d9
and they have a sub decimal value that uses the
1-2-3-5-7-9
pattern. For example a decimal only font
font-em-d1
can be applied a sub decimal value of
7
to form
font-em-d17
. The illustration below shows the list of decimal fonts and the sub decimals that can be applied on them
Decimals : font-em-d1
font-em-d2
font-em-d3
font-em-d4
font-em-d5
font-em-d6
font-em-d7
font-em-d8
font-em-d9
Subdecimals : 1
2
3
5
7
9
Examples : font-em-d1
font-em-d17
font-em-d25
Integer Relative Fonts
The integer relative fonts are em fonts that have whole digits assigned to them and they can be assigned decimal values but not subdecimals.
These fonts run from
1
to
6
while their decimal value that uses the pattern
d1-d2-d3-d5-d7-d9
. The illustration above best explains the syntax and examples
of these fonts.
Integer : font-em-1
font-em-2
font-em-3
font-em-4
font-em-5
font-em-6
Decimals : 1
2
3
5
7
9
Examples : font-em-1
font-em-1d5
font-em-2d7
This means that the unit value of any font can be assigned relative
to its real font size at the units of
0
through
9
. Each of these units employs a decimal pattern
of
d1-d2-d3-d5-d7-d9
except the decimal only fonts. For example, a font
font-em-1
can use a decimal value of
1
just by assigning the value
d1
to it to form
font-em-1d1
based on the pattern mentioned earlier. Since having a font size
font-em-0
is non realistic, there is not utility
class assigned for
font-em-0
, however there are categories of decimal only font sizes which can be assigned to any fonts. In this case, the zero
"0"
is ignored while the decimal part only remains. Font sizes in this category uses a different pattern of flow.