Permalink
Browse files

Normalize headings

There are various inconsistencies surrounding headings that make
this change worth trialing. The font-size of headings in IE6/7
isn't relative to the root font-size (see #61). Modern browsers
set the `h1` font-size based on the depth of nesting in certain
HTML5 sectioning elements. This change overcomes both the issues.

At the same time, the margins are being normalized so that they
are consistent and `em`-based. If people need to customise the
heading font-size and margin, they can either edit normalize.css
directly or override later in the source. But at least any non-
customised headings will behave consistently now.

Close #41
  • Loading branch information...
1 parent 2326dcb commit 1dea394cbffd697c97c6c924a0a2fc57ddc8731c @necolas committed Jan 31, 2012
Showing with 27 additions and 1 deletion.
  1. +27 −1 normalize.css
View
28 normalize.css
@@ -1,4 +1,4 @@
-/*! normalize.css 2012-01-31T13:28 UTC - http://github.com/necolas/normalize.css */
+/*! normalize.css 2012-01-31T15:37 UTC - http://github.com/necolas/normalize.css */
/* =============================================================================
HTML5 display definitions
@@ -122,6 +122,32 @@ a:active {
h1 {
font-size: 2em;
+ margin: 0.67em 0;
+}
+
+h2 {
+ font-size: 1.5em;
+ margin: 0.83em 0;
+}
+
+h3 {
+ font-size: 1.17em;
+ margin: 1em 0;
+}
+
+h4 {
+ font-size: 1em;
+ margin: 1.33em 0;
+}
+
+h5 {
+ font-size: 0.83em;
+ margin: 1.67em 0;
+}
+
+h6 {
+ font-size: 0.75em;
+ margin: 2.33em 0;
}
/*

0 comments on commit 1dea394

Please sign in to comment.