Skip to content

Commit

Permalink
Reorganise normalize.css and edit comments
Browse files Browse the repository at this point in the history
Update comments in line with any changes browsers have introduced.

Minor reordering of rulesets.
  • Loading branch information
necolas committed Jan 26, 2014
1 parent a2ae3b5 commit 3fe0df0
Showing 1 changed file with 112 additions and 114 deletions.
226 changes: 112 additions & 114 deletions normalize.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */

/* ==========================================================================
HTML5 display definitions
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/

html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}

/**
* Remove default margin.
*/

body {
margin: 0;
}

/* HTML5 display definitions
========================================================================== */

/**
Expand Down Expand Up @@ -56,32 +75,7 @@ template {
display: none;
}

/* ==========================================================================
Base
========================================================================== */

/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/

html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}

/**
* Remove default margin.
*/

body {
margin: 0;
}

/* ==========================================================================
Links
/* Links
========================================================================== */

/**
Expand All @@ -101,20 +95,9 @@ a:hover {
outline: 0;
}

/* ==========================================================================
Typography
/* Text-level semantics
========================================================================== */

/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari 5, and Chrome.
*/

h1 {
font-size: 2em;
margin: 0.67em 0;
}

/**
* Address styling not present in IE 8/9, Safari 5, and Chrome.
*/
Expand All @@ -141,13 +124,13 @@ dfn {
}

/**
* Address differences between Firefox and other browsers.
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari 5, and Chrome.
*/

hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
h1 {
font-size: 2em;
margin: 0.67em 0;
}

/**
Expand All @@ -159,26 +142,6 @@ mark {
color: #000;
}

/**
* Correct font family set oddly in Safari 5 and Chrome.
*/

code,
kbd,
pre,
samp {
font-family: monospace, serif;
font-size: 1em;
}

/**
* Contain overflow in all browsers.
*/

pre {
overflow: auto;
}

/**
* Address inconsistent and variable font size in all browsers.
*/
Expand Down Expand Up @@ -207,8 +170,7 @@ sub {
bottom: -0.25em;
}

/* ==========================================================================
Embedded content
/* Embedded content
========================================================================== */

/**
Expand All @@ -227,8 +189,7 @@ svg:not(:root) {
overflow: hidden;
}

/* ==========================================================================
Figures
/* Grouping content
========================================================================== */

/**
Expand All @@ -239,34 +200,48 @@ figure {
margin: 1em 40px;
}

/* ==========================================================================
Forms
========================================================================== */
/**
* Address differences between Firefox and other browsers.
*/

hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}

/**
* Define consistent border, margin, and padding.
* Contain overflow in all browsers.
*/

fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
pre {
overflow: auto;
}

/**
* 1. Correct `color` not being inherited in IE 8/9.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
* Address odd `em`-unit font size rendering in all browsers.
*/

legend {
border: 0; /* 1 */
padding: 0; /* 2 */
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}

/* Forms
========================================================================== */

/**
* 1. Correct color not being inherited in all browsers.
* Known issue: `select` will not inherit color in Chrome and Safari on OS X.
* 2. Correct font properties not being inherited in all browsers.
* Known limitation: by default, Chrome and Safari on OS X allow very limited
* styling of `select`, unless a `border` property is set.
*/

/**
* 1. Correct color not being inherited.
* Known issue: affects color of disabled elements.
* 2. Correct font properties not being inherited.
* 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
*/

Expand All @@ -280,15 +255,6 @@ textarea {
margin: 0; /* 3 */
}

/**
* Re-apply the `font-weight` to avoid modifying the default UX, and because
* the default cannot be changed in Chrome and Safari on OS X.
*/

optgroup {
font-weight: bold;
}

/**
* Address `overflow` set to `hidden` in IE 8/9/10.
*/
Expand All @@ -297,20 +263,11 @@ button {
overflow: visible;
}

/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/

input {
line-height: normal;
}

/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
* Correct `select` style inheritance in Firefox 4+ and Opera.
* Correct `button` style inheritance in Firefox, IE 8+, and Opera
* Correct `select` style inheritance in Firefox.
*/

button,
Expand Down Expand Up @@ -344,6 +301,28 @@ html input[disabled] {
}

/**
* Remove inner padding and border in Firefox 4+.
*/

button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}

/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/

input {
line-height: normal;
}

/**
* It's recommended that you don't attempt to style these elements.
* Firefox's implementation doesn't respect box-sizing, padding, or width.
*
* 1. Address box sizing set to `content-box` in IE 8/9/10.
* 2. Remove excess padding in IE 8/9/10.
*/
Expand Down Expand Up @@ -379,8 +358,9 @@ input[type="search"] {
}

/**
* Remove inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
* Safari (but not Chrome) clips the cancel button when the search input has
* padding (and `textfield` appearance).
*/

input[type="search"]::-webkit-search-cancel-button,
Expand All @@ -389,13 +369,23 @@ input[type="search"]::-webkit-search-decoration {
}

/**
* Remove inner padding and border in Firefox 4+.
* Define consistent border, margin, and padding.
*/

button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}

/**
* 1. Correct `color` not being inherited in IE 8/9.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/

legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}

/**
Expand All @@ -406,8 +396,16 @@ textarea {
overflow: auto;
}

/* ==========================================================================
Tables
/**
* Don't inherit the `font-weight` (applied by a rule above).
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
*/

optgroup {
font-weight: bold;
}

/* Tables
========================================================================== */

/**
Expand Down

0 comments on commit 3fe0df0

Please sign in to comment.