Skip to content

Commit cb17683

Browse files
committed
Remove hr and separate some margin normalizations
Recommend that people supporting IE6/7 do not use the `hr` element at all. It requires far more work than just normalizing margins. IE6/7 do not collapse margins set on `hr` with margins of pre- or proceeding elements. Separate the margin normalizations for `p` and `pre` from that for `h3`. Despite sharing the same margin value, headings are qualitatively different from these other elements. Both in terms of customisation and debugging using browser tools, it is cleaner to keep the margins of heading separate.
1 parent f1a096a commit cb17683

File tree

1 file changed

+18
-22
lines changed

1 file changed

+18
-22
lines changed

normalize.css

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! normalize.css 2012-02-07T05:02 UTC - http://github.com/necolas/normalize.css */
1+
/*! normalize.css 2012-02-07T10:31 UTC - http://github.com/necolas/normalize.css */
22

33
/* =============================================================================
44
HTML5 display definitions
@@ -68,7 +68,7 @@ html {
6868
-ms-text-size-adjust: 100%; /* 2 */
6969
}
7070

71-
/*
71+
/*
7272
* Addresses font-family inconsistency between 'textarea' and other form elements.
7373
*/
7474

@@ -133,11 +133,6 @@ h2 {
133133

134134
h3 {
135135
font-size: 1.17em;
136-
}
137-
138-
h3,
139-
p,
140-
pre {
141136
margin: 1em 0;
142137
}
143138

@@ -168,23 +163,15 @@ abbr[title] {
168163
* Addresses style set to 'bolder' in FF3+, S4/5, Chrome
169164
*/
170165

171-
b,
172-
strong {
173-
font-weight: bold;
166+
b,
167+
strong {
168+
font-weight: bold;
174169
}
175170

176171
blockquote {
177172
margin: 1em 40px;
178173
}
179174

180-
/*
181-
* Addresses styling not present in IE6/7
182-
*/
183-
184-
hr {
185-
margin: 0.5em auto;
186-
}
187-
188175
/*
189176
* Addresses styling not present in S5, Chrome
190177
*/
@@ -202,6 +189,15 @@ mark {
202189
color: #000;
203190
}
204191

192+
/*
193+
* Addresses margins set differently in IE6/7
194+
*/
195+
196+
p,
197+
pre {
198+
margin: 1em 0;
199+
}
200+
205201
/*
206202
* Corrects font family set oddly in IE6, S4/5, Chrome
207203
* en.wikipedia.org/wiki/User:Davidgothberg/Test59
@@ -327,7 +323,7 @@ img {
327323
}
328324

329325
/*
330-
* Corrects overflow displayed oddly in IE9
326+
* Corrects overflow displayed oddly in IE9
331327
*/
332328

333329
svg:not(:root) {
@@ -416,8 +412,8 @@ input {
416412
*/
417413

418414
button,
419-
input[type="button"],
420-
input[type="reset"],
415+
input[type="button"],
416+
input[type="reset"],
421417
input[type="submit"] {
422418
cursor: pointer; /* 1 */
423419
-webkit-appearance: button; /* 2 */
@@ -495,7 +491,7 @@ textarea {
495491
Tables
496492
========================================================================== */
497493

498-
/*
494+
/*
499495
* Remove most spacing between table cells
500496
*/
501497

0 commit comments

Comments
 (0)