Skip to content

Instantly share code, notes, and snippets.

@PDXIII
Created April 12, 2013 12:56
Show Gist options
  • Save PDXIII/5371811 to your computer and use it in GitHub Desktop.
Save PDXIII/5371811 to your computer and use it in GitHub Desktop.
Classic calculation of font-sizes for CSS
//Classic calculation of font-sizes found on http://webtypography.net/Harmony_and_Counterpoint/Size/3.1.1/
body { font-size:100%; }
h1 { font-size:2.25em; /* 16x2.25=36 */ }
h2 { font-size:1.5em; /* 16x1.5=24 */ }
h3 { font-size:1.125em; /* 16x1.125=18 */ }
h4 { font-size:0.875em; /* 16x0.875=14 */ }
p { font-size:0.75em; /* 16x0.75=12 */ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment