Move font-size:100% into html ruleset, fix #5. Remove placeholder body line-height.

This commit is contained in:
Nicolas Gallagher 2011-06-01 09:11:59 -07:00
parent ce0c3469e0
commit ba047db386

33
normalize.css vendored
View File

@ -39,31 +39,32 @@ video {
========================================================================== */ ========================================================================== */
/* /*
* 1. Add vertical scrollbar * 1. Add font size
* Addresses text resizing oddly in IE6/7 when body font-size is set using em units
* http://clagnut.com/blog/348/#c790
* 2. Add vertical scrollbar
* Keeps page centred in all browsers regardless of content height * Keeps page centred in all browsers regardless of content height
* 2. Remove Android and iOS tap highlight color to prevent entire container being highlighted * 3. Remove Android and iOS tap highlight color to prevent entire container being highlighted
* www.yuiblog.com/blog/2010/10/01/quick-tip-customizing-the-mobile-safari-tap-highlight-color/ * www.yuiblog.com/blog/2010/10/01/quick-tip-customizing-the-mobile-safari-tap-highlight-color/
* 3. Remove iOS text size adjust without disabling user zoom * 4. Remove iOS text size adjust without disabling user zoom
* www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ * www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
*/ */
html { html {
overflow-y: scroll; /* 1 */ font-size: 100%; /* 1 */
-webkit-tap-highlight-color: rgba(0,0,0,0); /* 2 */ overflow-y: scroll; /* 2 */
-webkit-text-size-adjust: 100%; /* 3 */ -webkit-tap-highlight-color: rgba(0,0,0,0); /* 3 */
-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; /* 4 */
-ms-text-size-adjust: 100%; /* 4 */
} }
/* /*
* 1. Define the base font-size (using % or em will retain text resizing in IE6/7) * Remove margin
* 2. Define the base line-height. * Addresses margins handled incorrectly in IE6/7
* 3. Remove margin
*/ */
body { body {
font-size: 100%; /* 1 */ margin: 0;
line-height: normal; /* 2 */
margin: 0; /* 3 */
} }
/* /*
@ -72,10 +73,10 @@ body {
*/ */
body, body,
input,
button, button,
textarea, input,
select { select,
textarea {
font-family: sans-serif; font-family: sans-serif;
} }