From 1dea394cbffd697c97c6c924a0a2fc57ddc8731c Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Tue, 31 Jan 2012 15:37:34 +0000 Subject: [PATCH] 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 --- normalize.css | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/normalize.css b/normalize.css index d885f12..8a33906 100644 --- a/normalize.css +++ b/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; } /*