Skip to content

Commit

Permalink
Normalize headings
Browse files Browse the repository at this point in the history
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
necolas committed Jan 31, 2012
1 parent 2326dcb commit 1dea394
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion normalize.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! normalize.css 2012-01-31T13:28 UTC - https://github.com/necolas/normalize.css */
/*! normalize.css 2012-01-31T15:37 UTC - https://github.com/necolas/normalize.css */

/* =============================================================================
HTML5 display definitions
Expand Down Expand Up @@ -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;
}

/*
Expand Down

0 comments on commit 1dea394

Please sign in to comment.