normalize.css/normalize.css
2011-05-17 02:39:30 -07:00

287 lines
5.1 KiB
CSS

/*
* Add display for block-level HTML5 elements
* Display not defined in IE6/7/8/9 & FF3
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section {
display: block;
}
/*
* Add display for embedded HTML5 elements
* Display not defined in IE6/7/8/9 & FF3
*/
audio,
canvas,
video {
display: inline-block;
*display: inline;
*zoom: 1;
}
/*
* 1. Add vertical scrollbar to <html> element
* Improves page center consistency regardless of content height in all browsers
* 2. Remove text size adjust tap color for <html> element
* Fixes tap color displayed oddly in iOS
* 3. Remove iOS text size adjust without disabling user zoom
*/
html {
overflow-y: scroll; /* 1 */
-webkit-tap-highlight-color: transparent; /* 2 */
-webkit-text-size-adjust: 100%; /* 3 */
-ms-text-size-adjust: 100%; /* 3 */
}
/*
* Remove margin from <body> element
*/
body {
margin: 0;
}
/*
* 1. Make outline thin dotted for <a>
* Fixes outline displayed oddly in C10
* 2. Remove outline for <a> element when active or hovered
* Improves readability when focused and also mouse hovered in all browsers
*/
/* 1 */
a:focus {
outline: thin dotted;
}
/* 2 */
a:active,
a:hover {
outline: none;
}
/*
* 1. Disable border for <img> element
* Improves readability when inside <a> element in all browsers
* 2. Allow high quality bicubic image resampling for <img> element
* 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/
*/
img {
border: 0; /* 1 */
-ms-interpolation-mode: bicubic; /* 2 */
}
/*
* Add bottom border to <abbr> element
* Fixes styling not present in IE6/7/8/9 C10 S5
*/
abbr[title] {
border-bottom: 1px dotted;
}
/*
* Add bold font weight to <b> and <strong> elements
* Fixes style set to 'bolder' in FF3/4 S4/5 C10
*/
b,
strong {
font-weight: bold;
}
/*
* Add italic font style to <dfn> element
* Fixes styling not present in C10 S5
*/
dfn {
font-style: italic;
}
/*
* Add yellow background and black text to <mark> element
* Fixes styling not present in IE6/7/8/9
*/
mark {
background-color: #FF0;
color: #000;
}
/*
* Redeclare monospace font family to <pre> <code> <kbd> <samp> elements
* en.wikipedia.org/wiki/User:Davidgothberg/Test59
* 1. Fixes font family set oddly in C10 S5
* 2. Fixes monospace font family set oddly in IE6
* 3. Fixes monospace line-height overflow in iOS
*/
pre,
code,
kbd,
samp {
font-family: monospace, sans-serif; /* 1 */
_font-family: 'Courier New', monospace, sans-serif; /* 2 */
font-size: 1em;
vertical-align: top; /* 3 */
}
/*
* Allow line wrapping for <pre> element
* Improves readability of pre-formatted text in all browsers
*/
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
/*
* Remove quotes from <q> element
* 1. Addresses CSS quotes not supported in IE6/7
* 2. Addresses quote attributes not supported in S4
*/
/* 1 */
q {
quotes: none;
}
/* 2 */
q:before,
q:after {
content: '';
content: none;
}
/*
* Define font-size and alignment for <small> element
*/
small {
font-size: 75%;
line-height: 1;
}
/*
* Position subscript and superscript content without affecting line-height
* Fixes alignment within multi-line text displayed oddly in all browsers
* - http://gist.github.com/413930
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/*
* Define alignment for <legend> element
* Fixes alignment displayed oddly in IE6/7
*/
legend {
*margin-left: -7px;
}
/*
* 1. Remove margin from form elements
* Fixes margin displayed oddly in C10 S5
* 2. Define consistent vertical alignment in all browsers
*/
button,
input,
select,
textarea {
margin: 0;
vertical-align: baseline;
}
/*
* Define inner-spacing for button elements
* Targeting all inputs is harmless to non-button elements
* 1. Fixes spacing displayed oddly in IE6/7
* 2. Fixes inner padding and border displayed in FF3/4
* www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
*/
/* 1 */
button,
input {
*overflow: visible;
}
/* 2 */
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/*
* 1. Disable default vertical scrollbar for <textarea> element
* Fixes scrollbar displayed oddly in IE6/7/8/9
* 2. Improves readability and aligment in all browsers
*/
textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
}
/*
* Define box sizing for <input> <select> <textarea> element
* Addresses box sizing not supported in IE6/7
*/
input[type='button'],
input[type='checkbox'],
input[type='radio'],
input[type='submit'],
select {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
input[type='text'],
input[type='password'],
textarea {
-webkit-appearance: textfield;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}