Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fc85cfb

Browse files
committed
Normalize h1 margin
Chrome, Safari, and Firefox all adjust the margin of `h1` at several levels of nesting within HTML5 sectioning elements. This change ensures that the margin, like the font-size, does not vary in these contexts. Fix necolasgh-160
1 parent 6729f5e commit fc85cfb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
== HEAD
22

3+
* Normalize `h1` margin when within HTML5 sectioning elements.
34
* Normalize `hr` element.
45
* Remove unnecessary `pre` styles.
56
* Add `main` element to HTML5 display definitions.

normalize.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,13 @@ a:hover {
101101
========================================================================== */
102102

103103
/**
104-
* Address variable `h1` font size within `section` and `article` contexts in
105-
* Firefox 4+, Safari 5, and Chrome.
104+
* Address variable `h1` font-size and margin within `section` and `article`
105+
* contexts in Firefox 4+, Safari 5, and Chrome.
106106
*/
107107

108108
h1 {
109109
font-size: 2em;
110+
margin: 0.67em 0;
110111
}
111112

112113
/**

0 commit comments

Comments
 (0)