mirror of
https://github.com/necolas/normalize.css.git
synced 2024-12-25 15:14:19 +00:00
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:
parent
4bf81bb824
commit
ce0c3469e0
157
normalize.css
vendored
157
normalize.css
vendored
@ -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,15 +34,17 @@ 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/
|
||||||
* 3. Remove iOS text size adjust without disabling user zoom
|
* 3. 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 {
|
||||||
@ -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,11 +80,11 @@ 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/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
img {
|
img {
|
||||||
@ -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,9 +115,9 @@ 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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
a:hover,
|
a:hover,
|
||||||
@ -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,18 +163,18 @@ 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 {
|
||||||
@ -220,7 +230,7 @@ small {
|
|||||||
/*
|
/*
|
||||||
* Position subscript and superscript content without affecting line-height
|
* Position subscript and superscript content without affecting line-height
|
||||||
* Fixes alignment within multi-line text displayed oddly in all browsers
|
* Fixes alignment within multi-line text displayed oddly in all browsers
|
||||||
* gist.github.com/413930
|
* gist.github.com/413930
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sub,
|
sub,
|
||||||
@ -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,9 +316,9 @@ 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,10 +346,10 @@ 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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
button,
|
button,
|
||||||
@ -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,8 +393,9 @@ input[type="search"]::-webkit-search-decoration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fix inner padding and border displayed in FF3/4
|
* Remove inner padding and border
|
||||||
* www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
|
* Fixes appearance displayed oddly in FF3/4
|
||||||
|
* www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
button::-moz-focus-inner,
|
button::-moz-focus-inner,
|
||||||
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user