Minor changes to properties and values that could be shortened. Improve comment language and change section-comment format (via Jonathan Neal).

This commit is contained in:
necolas 2011-05-31 23:06:06 +01:00
parent 4bf81bb824
commit ce0c3469e0

129
normalize.css vendored
View File

@ -1,8 +1,10 @@
/* ============================================================================================================= HTML5 ELEMENT DISPLAY */ /* =============================================================================
HTML5 element display
========================================================================== */
/* /*
* Add display for block-level HTML5 elements * Add display for block-level HTML5 elements
* Display not defined in IE6/7/8/9 & FF3 * Addresses display not defined in IE6/7/8/9 & FF3
*/ */
article, article,
@ -20,7 +22,7 @@ section {
/* /*
* Add display for embedded HTML5 elements * Add display for embedded HTML5 elements
* Display not defined in IE6/7/8/9 & FF3 * Addresses display not defined in IE6/7/8/9 & FF3
*/ */
audio[controls], audio[controls],
@ -32,10 +34,12 @@ video {
} }
/* ============================================================================================================= BASE STYLES & FIXES */ /* =============================================================================
Base
========================================================================== */
/* /*
* 1. Add vertical scrollbar to <html> element * 1. 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 * 2. 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/
@ -51,9 +55,9 @@ html {
} }
/* /*
* 1. Define the base font-size of choice; set in % or em to retain text resizing in IE6/7 * 1. Define the base font-size (using % or em will retain text resizing in IE6/7)
* 2. Define the base line-height of choice. * 2. Define the base line-height.
* 3. Remove margin from <body> element * 3. Remove margin
*/ */
body { body {
@ -63,8 +67,8 @@ body {
} }
/* /*
* Define the base font-family and text color for <body> and form elements * Define base font-family
* Fixes font-family inconsistency between <textarea> and other set form elements. * Addresses font-family inconsistency between <textarea> and other form elements.
*/ */
body, body,
@ -76,9 +80,9 @@ select {
} }
/* /*
* 1. Disable border for <img> element * 1. Remove border
* Improves readability when inside <a> element in all browsers * Improves readability when inside <a> element in all browsers
* 2. Allow high quality bicubic image resampling for <img> element * 2. Allow high quality bicubic image resampling
* Improves readability when scaled in IE7 * Improves readability when scaled in IE7
* Read before using : code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ * Read before using : code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
*/ */
@ -88,19 +92,22 @@ img {
-ms-interpolation-mode: bicubic; /* 2 */ -ms-interpolation-mode: bicubic; /* 2 */
} }
/* ............................................................................................................. Links */
/* =============================================================================
Links
========================================================================== */
a { a {
color: #0000EE; color: #00e;
} }
a:visited { a:visited {
color: #551A8B; color: #551a8b;
} }
/* /*
* Make outline thin dotted for <a> * Define outline as thin dotted
* Fixes outline displayed oddly in C10 * Addresses outline displayed oddly in Chrome
*/ */
a:focus { a:focus {
@ -108,7 +115,7 @@ a:focus {
} }
/* /*
* Remove outline for <a> element when active or hovered * Remove outline
* Improves readability when focused and also mouse hovered in all browsers * Improves readability when focused and also mouse hovered in all browsers
* people.opera.com/patrickl/experiments/keyboard/test * people.opera.com/patrickl/experiments/keyboard/test
*/ */
@ -118,10 +125,13 @@ a:active {
outline: 0; outline: 0;
} }
/* ............................................................................................................. General typography */
/* =============================================================================
Typography
========================================================================== */
/* /*
* Add bottom border to <abbr> element * Add bottom border
* Fixes styling not present in IE7/8/9 S5 Chrome * Fixes styling not present in IE7/8/9 S5 Chrome
*/ */
@ -130,7 +140,7 @@ abbr[title] {
} }
/* /*
* Add bold font weight to <b> and <strong> elements * Add bold font weight
* Fixes style set to 'bolder' in FF3/4 S4/5 Chrome * Fixes style set to 'bolder' in FF3/4 S4/5 Chrome
*/ */
@ -144,7 +154,7 @@ blockquote {
} }
/* /*
* Add italic font style to <dfn> element * Add italic font style
* Fixes styling not present in S5 Chrome * Fixes styling not present in S5 Chrome
*/ */
@ -153,17 +163,17 @@ dfn {
} }
/* /*
* Add yellow background and black text to <mark> element * Add yellow background and black text
* Fixes styling not present in IE6/7/8/9 * Fixes styling not present in IE6/7/8/9
*/ */
mark { mark {
background-color: #FF0; background: #ff0;
color: #000; color: #000;
} }
/* /*
* Redeclare monospace font family for <pre> <code> <kbd> <samp> elements * Redeclare monospace font family
* en.wikipedia.org/wiki/User:Davidgothberg/Test59 * en.wikipedia.org/wiki/User:Davidgothberg/Test59
* 1. Fixes font family set oddly in S5 Chrome * 1. Fixes font family set oddly in S5 Chrome
* 2. Fixes monospace font family set oddly in IE6 * 2. Fixes monospace font family set oddly in IE6
@ -174,12 +184,12 @@ code,
kbd, kbd,
samp { samp {
font-family: monospace, monospace; /* 1 */ font-family: monospace, monospace; /* 1 */
_font-family: 'Courier New', monospace; /* 2 */ _font-family: 'courier new', monospace; /* 2 */
font-size: 1em; font-size: 1em;
} }
/* /*
* Allow line wrapping for <pre> element * Add line wrapping
* Improves readability of pre-formatted text in all browsers * Improves readability of pre-formatted text in all browsers
*/ */
@ -190,9 +200,9 @@ pre {
} }
/* /*
* Remove quotes from <q> element * Remove quotes
* 1. Addresses CSS quotes not supported in IE6/7 * 1. Addresses CSS quotes not supported in IE6/7
* 2. Addresses quote attributes not supported in S4 * 2. Addresses quote property not supported in S4
*/ */
/* 1 */ /* 1 */
@ -210,7 +220,7 @@ q:after {
} }
/* /*
* Define font-size and alignment for <small> element * Define font-size
*/ */
small { small {
@ -239,7 +249,10 @@ sub {
bottom: -0.25em; bottom: -0.25em;
} }
/* ............................................................................................................. Lists */
/* =============================================================================
Lists
========================================================================== */
ul, ul,
ol { ol {
@ -256,21 +269,27 @@ nav ol {
list-style: none; list-style: none;
} }
/* ............................................................................................................. Figures */
/* =============================================================================
Figures
========================================================================== */
/* /*
* Define consistent margin for <figure> element * Remove margin
* Fixes margin not present in IE6/7/8/9, S5, O11 * Addresses margin not present in IE6/7/8/9, S5, O11
*/ */
figure { figure {
margin: 0; margin: 0;
} }
/* ............................................................................................................. Form elements */
/* =============================================================================
Forms
========================================================================== */
/* /*
* Remove margin from <form> element * Remove margin
* Fixes styling in IE6/7 * Fixes styling in IE6/7
*/ */
@ -279,7 +298,7 @@ form {
} }
/* /*
* Define consistent margin and padding for <fieldset> element * Define consistent margin and padding
*/ */
fieldset { fieldset {
@ -288,7 +307,7 @@ fieldset {
} }
/* /*
* Define alignment for <legend> element * Add negative left margin
* Fixes alignment displayed oddly in IE6/7 * Fixes alignment displayed oddly in IE6/7
*/ */
@ -297,8 +316,8 @@ legend {
} }
/* /*
* 1. Define font-size as equal to <body> font-size * 1. Define font-size as equal to ancestor's
* 2. Remove margin from form elements * 2. Remove margin
* Fixes different margins set in FF3/4 S5 Chrome * Fixes different margins set in FF3/4 S5 Chrome
* 3. Define consistent vertical alignment display in all browsers * 3. Define consistent vertical alignment display in all browsers
*/ */
@ -314,9 +333,10 @@ textarea {
} }
/* /*
* 1. Define consistent line-height as 'normal' * 1. Define line-height as normal
* FF3/4 set it using !important in the UA stylesheet * Addresses FF3/4 setting it using !important in the UA stylesheet
* 2. Fix spacing displayed oddly in IE6/7 * 2. Make overflow visible
* Fixes spacing displayed oddly in IE6/7
*/ */
button, button,
@ -326,9 +346,9 @@ input {
} }
/* /*
* 1. Display hand cursor for clickable form elements in all browsers except IE6. * 1. Display hand cursor for clickable form elements
* Improves usability and consistency of cursor style between image-type <input> and others * Improves usability and consistency of cursor style between image-type <input> and others
* 2. Define consistent appearance for clickable form elements * 2. Define appearance for clickable form elements
* Fixes inability to style clickable <input> types in iOS * Fixes inability to style clickable <input> types in iOS
*/ */
@ -341,7 +361,7 @@ input[type="submit"] {
} }
/* /*
* Define box sizing for checkbox and radio <input> types * Define box sizing
* Addresses box sizing set to content-box in IE8/9 * Addresses box sizing set to content-box in IE8/9
*/ */
@ -351,7 +371,7 @@ input[type="radio"] {
} }
/* /*
* Define box sizing and appearance for search <input> type * Define box sizing and appearance
* Addresses box sizing set to border-box in S5 Chrome (include -moz to future-proof) * Addresses box sizing set to border-box in S5 Chrome (include -moz to future-proof)
* Addresses appearance set to searchfield in S5 Chrome * Addresses appearance set to searchfield in S5 Chrome
*/ */
@ -373,7 +393,8 @@ input[type="search"]::-webkit-search-decoration {
} }
/* /*
* Fix inner padding and border displayed in FF3/4 * Remove inner padding and border
* Fixes appearance displayed oddly in FF3/4
* www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/ * www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
*/ */
@ -384,9 +405,10 @@ input::-moz-focus-inner {
} }
/* /*
* 1. Disable default vertical scrollbar for <textarea> element * 1. Remove default vertical scrollbar
* Fixes scrollbar displayed oddly in IE6/7/8/9 * Fixes scrollbar displayed oddly in IE6/7/8/9
* 2. Improves readability and aligment in all browsers * 2. Add top vertical alignment
* Improves readability and aligment in all browsers
*/ */
textarea { textarea {
@ -394,11 +416,14 @@ textarea {
vertical-align: top; /* 2 */ vertical-align: top; /* 2 */
} }
/* ............................................................................................................. Table elements */
/* =============================================================================
Tables
========================================================================== */
/* /*
* Remove most spacing between table cells * Remove most spacing between table cells
* Consistent vertical and horizontal alignment * Consistent vertical and horizontal alignment in all browsers
*/ */
table { table {