Typography
CSS3 introduces a few new units, including therem
unit, which stands for"root em".Therem
unit is relative to the font-size of the root elementhtml
.That means that we can define a single font size on the root element, and define allrem
units to be a percentage of that. The typography hasfont-size
defined in 1.6rem (16px) andline-height
in 1.6 (24px).Milligramuses thefont-family
Roboto,created byChristian Robertson,and provided by Google.
Headingh1
4.6rem (46px)
Headingh2
3.6rem (36px)
Headingh3
2.8rem (28px)
Headingh4
2.2rem (22px)
Headingh5
1.8rem (18px)
Headingh6
1.6rem (16px)
/* Base font-size and line-height */
The base type is 1.6rem (16px) over 1.6 line height (24px)
/* Other elements to text markup */
Anchor
Emphasis
Small
Strong
Underline
/* Default Headings */
Heading
Heading
Heading
Heading
Heading
Heading
/* The base font-size is set at 62.5% for having the convenience of sizing rems in a way that is similar to using px. So basically 1.6rem = 16px. */
Examples
You can view more examples of using Milligram.
Contributing
Want to contribute? Follow theserecommendations.
Subscribe to our newsletter
The latest news and resources sent straight to your inbox.