An introduction to modular typography for websites and a tool, Typografier, to help simplify use.
Modular type
font-size: base-font-size × type-scale ^ distance-from-base line-height: ceil(font-size ÷ base-line-height) × (base-line-height ÷ font-size)
(With a little finessing based on our design eyes.)
I don’t want to have to write this code every time!
Typografier »
line-height
.micro, .milli, .kilo, etc.
<link href="css/type.css" rel="stylesheet"> <h1 class="micro">Heading Level 1</h1> <h2 class="giga">Heading Level 2</h2> <p class="yotta">Text block</p> <p class="milli">Another text block</p>
<h1 class="push-0">Heading Level 1</h1> <h2 class="push-2">Heading Level 2</h2> <h3 class="island">Heading Level 3</h3>
<h1 class="italic not-bold">Heading Level 1</h1> <h2 class="text-right">Heading Level 2</h2> <p class="max-length">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>