├── component.json ├── bower.json ├── package.json ├── LICENSE.md ├── CHANGELOG.md ├── README.md ├── CONTRIBUTING.md ├── normalize.css └── test.html /component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "normalize.css", 3 | "repo": "necolas/normalize.css", 4 | "version": "3.0.2", 5 | "styles": ["normalize.css"], 6 | "author": "Nicolas Gallagher", 7 | "license": "MIT" 8 | } 9 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "normalize-css", 3 | "version": "3.0.2", 4 | "main": "normalize.css", 5 | "author": "Nicolas Gallagher", 6 | "ignore": [ 7 | "CHANGELOG.md", 8 | "CONTRIBUTING.md", 9 | "component.json", 10 | "package.json", 11 | "test.html" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "normalize.css", 3 | "version": "3.0.2", 4 | "description": "Normalize.css as a node packaged module", 5 | "style": "normalize.css", 6 | "files": [ 7 | "normalize.css" 8 | ], 9 | "homepage": "http://necolas.github.io/normalize.css", 10 | "repository": { 11 | "type": "git", 12 | "url": "git://github.com/necolas/normalize.css.git" 13 | }, 14 | "main": "normalize.css", 15 | "author": "Nicolas Gallagher", 16 | "license": "MIT" 17 | } 18 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) Nicolas Gallagher and Jonathan Neal 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | === HEAD 2 | 3 | === 3.0.2 (October 4, 2014) 4 | 5 | * Only alter `background-color` of links in IE 10. 6 | * Add `menu` element to HTML5 display definitions. 7 | 8 | === 3.0.1 (March 27, 2014) 9 | 10 | * Add package.json for npm support. 11 | 12 | === 3.0.0 (January 28, 2014) 13 | 14 | === 3.0.0-rc.1 (January 26, 2014) 15 | 16 | * Explicit tests for each normalization. 17 | * Fix i18n for `q` element. 18 | * Fix `pre` text formatting and overflow. 19 | * Fix vertical alignment of `progress`. 20 | * Address `button` overflow in IE 8/9/10. 21 | * Revert `textarea` alignment modification. 22 | * Fix number input button cursor in Chrome on OS X. 23 | * Remove `a:focus` outline normalization. 24 | * Fix `figure` margin normalization. 25 | * Normalize `optgroup`. 26 | * Remove default table cell padding. 27 | * Set correct display for `progress` in IE 8/9. 28 | * Fix `font` and `color` inheritance for forms. 29 | 30 | === 2.1.3 (August 26, 2013) 31 | 32 | * Fix component.json. 33 | * Remove the gray background color from active links in IE 10. 34 | 35 | === 2.1.2 (May 11, 2013) 36 | 37 | * Revert root `color` and `background` normalizations. 38 | 39 | === 2.1.1 (April 8, 2013) 40 | 41 | * Normalize root `color` and `background` to counter the effects of system 42 | color schemes. 43 | 44 | === 2.1.0 (January 21, 2013) 45 | 46 | * Normalize `text-transform` for `button` and `select`. 47 | * Normalize `h1` margin when within HTML5 sectioning elements. 48 | * Normalize `hr` element. 49 | * Remove unnecessary `pre` styles. 50 | * Add `main` element to HTML5 display definitions. 51 | * Fix cursor style for disabled button `input`. 52 | 53 | === 2.0.1 (August 20, 2012) 54 | 55 | * Remove stray IE 6/7 `inline-block` hack from HTML5 display settings. 56 | 57 | === 2.0.0 (August 19, 2012) 58 | 59 | * Remove legacy browser form normalizations. 60 | * Remove all list normalizations. 61 | * Add `quotes` normalizations. 62 | * Remove all heading normalizations except `h1` font size. 63 | * Form elements automatically inherit `font-family` from ancestor. 64 | * Drop support for IE 6/7, Firefox < 4, and Safari < 5. 65 | 66 | === 1.0.1 (August 19, 2012) 67 | 68 | * Adjust `small` font size normalization. 69 | 70 | === 1.0.0 (August 14, 2012) 71 | 72 | (Only the notable changes since public release) 73 | 74 | * Add MIT License. 75 | * Hide `audio` elements without controls in iOS 5 (#69). 76 | * Normalize heading margins and font size. 77 | * Move font-family normalization from `body` to `html` (#62). 78 | * Remove scrollbar normalization (#64 #65). 79 | * Remove excess padding from checkbox and radio inputs in IE 7 (#42). 80 | * Add IE9 correction for SVG overflow (#16). 81 | * Add fix for legend not inheriting color in IE 6/7/8/9. 82 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # normalize.css v3 2 | 3 | Normalize.css is a customisable CSS file that makes browsers render all 4 | elements more consistently and in line with modern standards. 5 | 6 | The project relies on researching the differences between default browser 7 | styles in order to precisely target only the styles that need or benefit from 8 | normalizing. 9 | 10 | [View the test file](http://necolas.github.io/normalize.css/latest/test.html) 11 | 12 | ## Install 13 | 14 | * [npm](http://npmjs.org/): `npm install --save normalize.css` 15 | * [Component(1)](https://github.com/component/component/): `component install necolas/normalize.css` 16 | * [Bower](http://bower.io/): `bower install --save normalize.css` 17 | * [Download](http://necolas.github.io/normalize.css/latest/normalize.css). 18 | 19 | No other styles should come before Normalize.css. 20 | 21 | It is recommended that you include the `normalize.css` file as untouched 22 | library code. 23 | 24 | ## What does it do? 25 | 26 | * Preserves useful defaults, unlike many CSS resets. 27 | * Normalizes styles for a wide range of elements. 28 | * Corrects bugs and common browser inconsistencies. 29 | * Improves usability with subtle improvements. 30 | * Explains what code does using detailed comments. 31 | 32 | ## Browser support 33 | 34 | * Google Chrome (latest) 35 | * Mozilla Firefox (latest) 36 | * Mozilla Firefox 4 37 | * Opera (latest) 38 | * Apple Safari 6+ 39 | * Internet Explorer 8+ 40 | 41 | [Normalize.css v1 provides legacy browser 42 | support](https://github.com/necolas/normalize.css/tree/v1) (IE 6+, Safari 4+), 43 | but is no longer actively developed. 44 | 45 | ## Extended details 46 | 47 | Additional detail and explanation of the esoteric parts of normalize.css. 48 | 49 | #### `pre, code, kbd, samp` 50 | 51 | The `font-family: monospace, monospace` hack fixes the inheritance and scaling 52 | of font-size for preformated text. The duplication of `monospace` is 53 | intentional. [Source](http://en.wikipedia.org/wiki/User:Davidgothberg/Test59). 54 | 55 | #### `sub, sup` 56 | 57 | Normally, using `sub` or `sup` affects the line-box height of text in all 58 | browsers. [Source](http://gist.github.com/413930). 59 | 60 | #### `svg:not(:root)` 61 | 62 | Adding `overflow: hidden` fixes IE9's SVG rendering. Earlier versions of IE 63 | don't support SVG, so we can safely use the `:not()` and `:root` selectors that 64 | modern browsers use in the default UA stylesheets to apply this style. [SVG 65 | Mailing List discussion](http://lists.w3.org/Archives/Public/public-svg-wg/2008JulSep/0339.html) 66 | 67 | #### `input[type="search"]` 68 | 69 | The search input is not fully stylable by default. In Chrome and Safari on 70 | OSX/iOS you can't control `font`, `padding`, `border`, or `background`. In 71 | Chrome and Safari on Windows you can't control `border` properly. It will apply 72 | `border-width` but will only show a border color (which cannot be controlled) 73 | for the outer 1px of that border. Applying `-webkit-appearance: textfield` 74 | addresses these issues without removing the benefits of search inputs (e.g. 75 | showing past searches). 76 | 77 | #### `legend` 78 | 79 | Adding `border: 0` corrects an IE 8–11 bug where `color` (yes, `color`) is not 80 | inherited by `legend`. 81 | 82 | ## Contributing 83 | 84 | Please read the CONTRIBUTING.md 85 | 86 | ## Acknowledgements 87 | 88 | Normalize.css is a project by [Nicolas Gallagher](https://github.com/necolas), 89 | co-created with [Jonathan Neal](https://github.com/jonathantneal). 90 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to normalize.css 2 | 3 | Please take a moment to review this document in order to make the contribution 4 | process easy and effective for everyone involved. 5 | 6 | Following these guidelines helps to communicate that you respect the time of 7 | the developers managing and developing this open source project. In return, 8 | they should reciprocate that respect in addressing your issue or assessing 9 | patches and features. 10 | 11 | 12 | ## Using the issue tracker 13 | 14 | The issue tracker is the preferred channel for [bug reports](#bugs), 15 | [features requests](#features) and [submitting pull 16 | requests](#pull-requests), but please respect the following restrictions: 17 | 18 | * Please **do not** use the issue tracker for personal support requests. 19 | 20 | * Please **do not** derail or troll issues. Keep the discussion on topic and 21 | respect the opinions of others. 22 | 23 | 24 | 25 | ## Bug reports 26 | 27 | A bug is a _demonstrable problem_ that is caused by the code in the repository. 28 | Good bug reports are extremely helpful - thank you! 29 | 30 | Guidelines for bug reports: 31 | 32 | 1. **Use the GitHub issue search** – check if the issue has already been 33 | reported. 34 | 35 | 2. **Check if the issue has been fixed** – try to reproduce it using the 36 | latest `master` branch in the repository. 37 | 38 | 3. **Isolate the problem** – create a live example (e.g., on 39 | [Codepen](http://codepen.io)) of a [reduced test 40 | case](http://css-tricks.com/6263-reduced-test-cases/). 41 | 42 | A good bug report shouldn't leave others needing to chase you up for more 43 | information. Please try to be as detailed as possible in your report. What is 44 | your environment? What steps will reproduce the issue? What browser(s) and OS 45 | experience the problem? What would you expect to be the outcome? All these 46 | details will help people to fix any potential bugs. 47 | 48 | Example: 49 | 50 | > Short and descriptive example bug report title 51 | > 52 | > A summary of the issue and the browser/OS environment in which it occurs. If 53 | > suitable, include the steps required to reproduce the bug. 54 | > 55 | > 1. This is the first step 56 | > 2. This is the second step 57 | > 3. Further steps, etc. 58 | > 59 | > `` - a link to the reduced test case 60 | > 61 | > Any other information you want to share that is relevant to the issue being 62 | > reported. This might include the lines of code that you have identified as 63 | > causing the bug, and potential solutions (and your opinions on their 64 | > merits). 65 | 66 | 67 | 68 | ## Feature requests 69 | 70 | Feature requests are welcome. But take a moment to find out whether your idea 71 | fits with the scope and aims of the project. It's up to *you* to make a strong 72 | case to convince the project's developers of the merits of this feature. Please 73 | provide as much detail and context as possible. 74 | 75 | 76 | 77 | ## Pull requests 78 | 79 | Good pull requests - patches, improvements, new features - are a fantastic 80 | help. They should remain focused in scope and avoid containing unrelated 81 | commits. 82 | 83 | **Please ask first** before embarking on any significant work, otherwise you 84 | risk spending a lot of time working on something that the project's developers 85 | might not want to merge into the project. 86 | 87 | Please adhere to the coding conventions used throughout a project (whitespace, 88 | accurate comments, etc.) and any other requirements (such as test coverage). 89 | 90 | Follow this process if you'd like your work considered for inclusion in the 91 | project: 92 | 93 | 1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, 94 | and configure the remotes: 95 | 96 | ```bash 97 | # Clone your fork of the repo into the current directory 98 | git clone https://github.com//normalize.css 99 | # Navigate to the newly cloned directory 100 | cd normalize.css 101 | # Assign the original repo to a remote called "upstream" 102 | git remote add upstream https://github.com/necolas/normalize.css 103 | ``` 104 | 105 | 2. If you cloned a while ago, get the latest changes from upstream: 106 | 107 | ```bash 108 | git checkout master 109 | git pull upstream master 110 | ``` 111 | 112 | 3. Never work directly on `master`. Create a new topic branch (off the latest 113 | version of `master`) to contain your feature, change, or fix: 114 | 115 | ```bash 116 | git checkout -b 117 | ``` 118 | 119 | 4. Commit your changes in logical chunks. Please adhere to these [git commit 120 | message conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) 121 | or your code is unlikely be merged into the main project. Use Git's 122 | [interactive rebase](https://help.github.com/articles/interactive-rebase) 123 | feature to tidy up your commits before making them public. 124 | 125 | Make sure to add a test to the `test.html` file if appropriate, and test 126 | your change in all supported browsers. 127 | 128 | 5. Locally rebase the upstream development branch into your topic branch: 129 | 130 | ```bash 131 | git pull --rebase upstream master 132 | ``` 133 | 134 | 6. Push your topic branch up to your fork: 135 | 136 | ```bash 137 | git push origin 138 | ``` 139 | 140 | 10. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) 141 | with a clear title and description. 142 | 143 | Please submit a separate pull request for any appropriate changes required 144 | in the `v1` branch for legacy browsers. 145 | 146 | **IMPORTANT**: By submitting a patch, you agree to allow the project owner to 147 | license your work under the same license as that used by the project. 148 | 149 | 150 | 151 | ## Maintainers 152 | 153 | If you have commit access, please follow this process for merging patches and 154 | cutting new releases. 155 | 156 | ### Accepting patches 157 | 158 | 1. Check that a patch is within the scope and philosophy of the project. 159 | 2. Check that a patch has any necessary tests and a proper, descriptive commit 160 | message. 161 | 3. Test the patch locally. 162 | 4. Do not use GitHub's merge button. Apply the patch to `master` locally 163 | (either via `git am` or by checking the whole branch out). Amend minor 164 | problems with the author's original commit if necessary. Then push to GitHub. 165 | 5. If a patch should be included in `v1`, cherry-pick the commits or manually 166 | apply if all else fails. 167 | 168 | ### Releasing a new version 169 | 170 | 1. Include all new functional changes in the CHANGELOG. 171 | 2. Use a dedicated commit to increment the version. The version needs to be 172 | added to the CHANGELOG (inc. date), and the `bower.json`, `component.json`, 173 | and `normalize.css` files. 174 | 3. The commit message must be of `v0.0.0` format. 175 | 4. Create an annotated tag for the version: `git tag -m "v0.0.0" 0.0.0`. 176 | 5. Push the changes and tags to GitHub: `git push --tags origin master` 177 | 6. Checkout the `gh-pages` branch and follow the instructions in the README. 178 | -------------------------------------------------------------------------------- /normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v3.0.2 | MIT License | git.io/normalize */ 2 | 3 | /** 4 | * 1. Set default font family to sans-serif. 5 | * 2. Prevent iOS text size adjust after orientation change, without disabling 6 | * user zoom. 7 | */ 8 | 9 | html { 10 | font-family: sans-serif; /* 1 */ 11 | -ms-text-size-adjust: 100%; /* 2 */ 12 | -webkit-text-size-adjust: 100%; /* 2 */ 13 | } 14 | 15 | /** 16 | * Remove default margin. 17 | */ 18 | 19 | body { 20 | margin: 0; 21 | } 22 | 23 | /* HTML5 display definitions 24 | ========================================================================== */ 25 | 26 | /** 27 | * Correct `block` display not defined for any HTML5 element in IE 8/9. 28 | * Correct `block` display not defined for `details` or `summary` in IE 10/11 29 | * and Firefox. 30 | * Correct `block` display not defined for `main` in IE 11. 31 | */ 32 | 33 | article, 34 | aside, 35 | details, 36 | figcaption, 37 | figure, 38 | footer, 39 | header, 40 | hgroup, 41 | main, 42 | menu, 43 | nav, 44 | section, 45 | summary { 46 | display: block; 47 | } 48 | 49 | /** 50 | * 1. Correct `inline-block` display not defined in IE 8/9. 51 | * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. 52 | */ 53 | 54 | audio, 55 | canvas, 56 | progress, 57 | video { 58 | display: inline-block; /* 1 */ 59 | vertical-align: baseline; /* 2 */ 60 | } 61 | 62 | /** 63 | * Prevent modern browsers from displaying `audio` without controls. 64 | * Remove excess height in iOS 5 devices. 65 | */ 66 | 67 | audio:not([controls]) { 68 | display: none; 69 | height: 0; 70 | } 71 | 72 | /** 73 | * Address `[hidden]` styling not present in IE 8/9/10. 74 | * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. 75 | */ 76 | 77 | [hidden], 78 | template { 79 | display: none; 80 | } 81 | 82 | /* Links 83 | ========================================================================== */ 84 | 85 | /** 86 | * Remove the gray background color from active links in IE 10. 87 | */ 88 | 89 | a { 90 | background-color: transparent; 91 | } 92 | 93 | /** 94 | * Improve readability when focused and also mouse hovered in all browsers. 95 | */ 96 | 97 | a:active, 98 | a:hover { 99 | outline: 0; 100 | } 101 | 102 | /* Text-level semantics 103 | ========================================================================== */ 104 | 105 | /** 106 | * Address styling not present in IE 8/9/10/11, Safari, and Chrome. 107 | */ 108 | 109 | abbr[title] { 110 | border-bottom: 1px dotted; 111 | } 112 | 113 | /** 114 | * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. 115 | */ 116 | 117 | b, 118 | strong { 119 | font-weight: bold; 120 | } 121 | 122 | /** 123 | * Address styling not present in Safari and Chrome. 124 | */ 125 | 126 | dfn { 127 | font-style: italic; 128 | } 129 | 130 | /** 131 | * Address variable `h1` font-size and margin within `section` and `article` 132 | * contexts in Firefox 4+, Safari, and Chrome. 133 | */ 134 | 135 | h1 { 136 | font-size: 2em; 137 | margin: 0.67em 0; 138 | } 139 | 140 | /** 141 | * Address styling not present in IE 8/9. 142 | */ 143 | 144 | mark { 145 | background: #ff0; 146 | color: #000; 147 | } 148 | 149 | /** 150 | * Address inconsistent and variable font size in all browsers. 151 | */ 152 | 153 | small { 154 | font-size: 80%; 155 | } 156 | 157 | /** 158 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 159 | */ 160 | 161 | sub, 162 | sup { 163 | font-size: 75%; 164 | line-height: 0; 165 | position: relative; 166 | vertical-align: baseline; 167 | } 168 | 169 | sup { 170 | top: -0.5em; 171 | } 172 | 173 | sub { 174 | bottom: -0.25em; 175 | } 176 | 177 | /* Embedded content 178 | ========================================================================== */ 179 | 180 | /** 181 | * Remove border when inside `a` element in IE 8/9/10. 182 | */ 183 | 184 | img { 185 | border: 0; 186 | } 187 | 188 | /** 189 | * Correct overflow not hidden in IE 9/10/11. 190 | */ 191 | 192 | svg:not(:root) { 193 | overflow: hidden; 194 | } 195 | 196 | /* Grouping content 197 | ========================================================================== */ 198 | 199 | /** 200 | * Address margin not present in IE 8/9 and Safari. 201 | */ 202 | 203 | figure { 204 | margin: 1em 40px; 205 | } 206 | 207 | /** 208 | * Address differences between Firefox and other browsers. 209 | */ 210 | 211 | hr { 212 | -moz-box-sizing: content-box; 213 | box-sizing: content-box; 214 | height: 0; 215 | } 216 | 217 | /** 218 | * Contain overflow in all browsers. 219 | */ 220 | 221 | pre { 222 | overflow: auto; 223 | } 224 | 225 | /** 226 | * Address odd `em`-unit font size rendering in all browsers. 227 | */ 228 | 229 | code, 230 | kbd, 231 | pre, 232 | samp { 233 | font-family: monospace, monospace; 234 | font-size: 1em; 235 | } 236 | 237 | /* Forms 238 | ========================================================================== */ 239 | 240 | /** 241 | * Known limitation: by default, Chrome and Safari on OS X allow very limited 242 | * styling of `select`, unless a `border` property is set. 243 | */ 244 | 245 | /** 246 | * 1. Correct color not being inherited. 247 | * Known issue: affects color of disabled elements. 248 | * 2. Correct font properties not being inherited. 249 | * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. 250 | */ 251 | 252 | button, 253 | input, 254 | optgroup, 255 | select, 256 | textarea { 257 | color: inherit; /* 1 */ 258 | font: inherit; /* 2 */ 259 | margin: 0; /* 3 */ 260 | } 261 | 262 | /** 263 | * Address `overflow` set to `hidden` in IE 8/9/10/11. 264 | */ 265 | 266 | button { 267 | overflow: visible; 268 | } 269 | 270 | /** 271 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 272 | * All other form control elements do not inherit `text-transform` values. 273 | * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. 274 | * Correct `select` style inheritance in Firefox. 275 | */ 276 | 277 | button, 278 | select { 279 | text-transform: none; 280 | } 281 | 282 | /** 283 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 284 | * and `video` controls. 285 | * 2. Correct inability to style clickable `input` types in iOS. 286 | * 3. Improve usability and consistency of cursor style between image-type 287 | * `input` and others. 288 | */ 289 | 290 | button, 291 | html input[type="button"], /* 1 */ 292 | input[type="reset"], 293 | input[type="submit"] { 294 | -webkit-appearance: button; /* 2 */ 295 | cursor: pointer; /* 3 */ 296 | } 297 | 298 | /** 299 | * Re-set default cursor for disabled elements. 300 | */ 301 | 302 | button[disabled], 303 | html input[disabled] { 304 | cursor: default; 305 | } 306 | 307 | /** 308 | * Remove inner padding and border in Firefox 4+. 309 | */ 310 | 311 | button::-moz-focus-inner, 312 | input::-moz-focus-inner { 313 | border: 0; 314 | padding: 0; 315 | } 316 | 317 | /** 318 | * Address Firefox 4+ setting `line-height` on `input` using `!important` in 319 | * the UA stylesheet. 320 | */ 321 | 322 | input { 323 | line-height: normal; 324 | } 325 | 326 | /** 327 | * It's recommended that you don't attempt to style these elements. 328 | * Firefox's implementation doesn't respect box-sizing, padding, or width. 329 | * 330 | * 1. Address box sizing set to `content-box` in IE 8/9/10. 331 | * 2. Remove excess padding in IE 8/9/10. 332 | */ 333 | 334 | input[type="checkbox"], 335 | input[type="radio"] { 336 | box-sizing: border-box; /* 1 */ 337 | padding: 0; /* 2 */ 338 | } 339 | 340 | /** 341 | * Fix the cursor style for Chrome's increment/decrement buttons. For certain 342 | * `font-size` values of the `input`, it causes the cursor style of the 343 | * decrement button to change from `default` to `text`. 344 | */ 345 | 346 | input[type="number"]::-webkit-inner-spin-button, 347 | input[type="number"]::-webkit-outer-spin-button { 348 | height: auto; 349 | } 350 | 351 | /** 352 | * 1. Address `appearance` set to `searchfield` in Safari and Chrome. 353 | * 2. Address `box-sizing` set to `border-box` in Safari and Chrome 354 | * (include `-moz` to future-proof). 355 | */ 356 | 357 | input[type="search"] { 358 | -webkit-appearance: textfield; /* 1 */ 359 | -moz-box-sizing: content-box; 360 | -webkit-box-sizing: content-box; /* 2 */ 361 | box-sizing: content-box; 362 | } 363 | 364 | /** 365 | * Remove inner padding and search cancel button in Safari and Chrome on OS X. 366 | * Safari (but not Chrome) clips the cancel button when the search input has 367 | * padding (and `textfield` appearance). 368 | */ 369 | 370 | input[type="search"]::-webkit-search-cancel-button, 371 | input[type="search"]::-webkit-search-decoration { 372 | -webkit-appearance: none; 373 | } 374 | 375 | /** 376 | * Define consistent border, margin, and padding. 377 | */ 378 | 379 | fieldset { 380 | border: 1px solid #c0c0c0; 381 | margin: 0 2px; 382 | padding: 0.35em 0.625em 0.75em; 383 | } 384 | 385 | /** 386 | * 1. Correct `color` not being inherited in IE 8/9/10/11. 387 | * 2. Remove padding so people aren't caught out if they zero out fieldsets. 388 | */ 389 | 390 | legend { 391 | border: 0; /* 1 */ 392 | padding: 0; /* 2 */ 393 | } 394 | 395 | /** 396 | * Remove default vertical scrollbar in IE 8/9/10/11. 397 | */ 398 | 399 | textarea { 400 | overflow: auto; 401 | } 402 | 403 | /** 404 | * Don't inherit the `font-weight` (applied by a rule above). 405 | * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. 406 | */ 407 | 408 | optgroup { 409 | font-weight: bold; 410 | } 411 | 412 | /* Tables 413 | ========================================================================== */ 414 | 415 | /** 416 | * Remove most spacing between table cells. 417 | */ 418 | 419 | table { 420 | border-collapse: collapse; 421 | border-spacing: 0; 422 | } 423 | 424 | td, 425 | th { 426 | padding: 0; 427 | } 428 | -------------------------------------------------------------------------------- /test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Normalize CSS: UI tests 6 | 7 | 8 | 82 | 83 |
84 | . 85 | 86 |

Normalize.css: UI tests

87 | 88 |

html

89 |

should have sans-serif font family (opinionated)

90 |
91 | abcdefghijklmnopqrstuvwxyz 92 |
93 | 94 |

body

95 |

should have no margin (opinionated)

96 |
97 | (there should be no red background visible on this page) 98 |
99 | 100 |

101 | article, aside, details, 102 | figure, figcaption, footer, 103 | header, hgroup, main, 104 | menu, nav, section, 105 | summary 106 |

107 |

should render as block

108 |
109 |
article
110 | 111 |
112 | summary 113 | details 114 |
115 |
116 | figure 117 |
figcaption
118 |
119 |
footer
120 |
header
121 |
hgroup
122 |
main
123 |
  • menu
  • 124 | 125 |
    section
    126 |
    127 | 128 |

    audio, canvas, progress, video

    129 |

    should render as inline-block and baseline-aligned

    130 |
    131 | 132 | canvas 133 | progress 134 | 135 |
    136 | 137 |

    audio:not([controls]), template, [hidden]

    138 |

    should not display

    139 |
    140 | 141 | 145 | 146 |
    147 | 148 |

    a

    149 |

    should have a transparent background when active

    150 |
    151 | dummy anchor 152 |
    153 |

    should not have a focus outline when both focused and hovered (opinionated)

    154 |
    155 | dummy anchor 156 |
    157 | 158 |

    abbr[title]

    159 |

    should have a dotted bottom border

    160 |
    161 | abbr 162 |
    163 | 164 |

    b, strong

    165 |

    should have bold font-weight

    166 |
    167 | b 168 | strong 169 |
    170 | 171 |

    dfn

    172 |

    should have italic font-style

    173 |
    174 | dfn 175 |
    176 | 177 |

    h1

    178 |

    should not change size within an article

    179 |
    180 |

    Heading (control)

    181 |
    182 |

    Heading (in article)

    183 |
    184 |
    185 |

    should not change size within a section

    186 |
    187 |

    Heading (control)

    188 |
    189 |

    Heading (in section)

    190 |
    191 |
    192 | 193 |

    mark

    194 |

    should have a yellow background

    195 |
    196 | mark 197 |
    198 | 199 |

    small

    200 |

    should render equally small in all browsers

    201 |
    202 | control. small. 203 |
    204 | 205 |

    sub and sup

    206 |

    should not affect a line's visual line-height

    207 |
    208 |

    control.

    209 |

    control. sub.

    210 |

    control. sup.

    211 |
    212 | 213 |

    img

    214 |

    should not have a border when wrapped in an anchor

    215 | 221 | 222 |

    svg

    223 |

    should not overflow

    224 |
    225 | 226 | 227 | 228 |
    229 | 230 |

    figure

    231 |

    should have margins

    232 |
    233 |
    234 | 235 |
    236 |
    237 | 238 |

    hr

    239 |

    should have a content-box box model

    240 |
    241 |
    242 |
    243 | 244 |

    pre

    245 |

    should trigger a scrollbar when too wide for its container

    246 |
    247 |
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et me.
    248 |
    249 | 250 |

    code, kbd, pre, samp

    251 |

    should render em-unit preformatted text at the same absolute size as normal text

    252 |
    253 | span: abcdefghijklmnopqrstuvwxyz.
    254 | code: abcdefghijklmnopqrstuvwxyz.
    255 | kbd: abcdefghijklmnopqrstuvwxyz.
    256 | samp: abcdefghijklmnopqrstuvwxyz. 257 |
    pre: abcdefghijklmnopqrstuvwxyz.
    258 |
    259 | 260 |

    button, input, optgroup, select, textarea

    261 |

    should inherit color from ancestor

    262 |
    263 |
    264 |
    265 |
    271 | 272 |
    273 |

    should inherit font from ancestor

    274 |
    275 |
    276 |
    277 |
    283 | 284 |
    285 |

    should not have margins

    286 |
    287 | 300 | 301 | 302 | 308 | 309 |
    310 | 311 |

    button

    312 |

    should have visible overflow

    313 |
    314 | 325 | 326 |
    327 | 328 |

    button, select

    329 |

    should not inherit text-transform

    330 |
    331 | 332 | 333 |
    334 | 335 |

    button and button-style input

    336 |

    should have pointer cursor style

    337 |
    338 |

    339 |

    340 |

    341 |

    342 |

    343 |
    344 |

    should be styleable

    345 |
    346 | 355 |

    356 |

    357 |

    358 |

    359 |

    360 |
    361 | 362 |

    disabled button and input

    363 |

    should have default cursor style

    364 |
    365 |

    366 |

    367 |

    368 |

    369 |

    370 |
    371 | 372 |

    button, input

    373 |

    should not have extra inner padding in Firefox

    374 |
    375 | 383 |

    384 |

    385 |

    386 |

    387 |

    388 |
    389 | 390 |

    input

    391 |

    should not inherit line-height

    392 |
    393 | 394 |
    395 | 396 |

    input[type="checkbox"], input[type="radio"]

    397 |

    should have a border-box box model

    398 |
    399 | 412 | 413 | 414 |
    415 |

    should not have padding

    416 |
    417 | 418 | 419 |
    420 | 421 |

    input[type="number"]

    422 |

    should display a default cursor for the decrement button's click target in Chrome

    423 |
    424 | 425 |
    426 | 427 |

    input[type="search"]

    428 |

    should be styleable

    429 |
    430 | 431 |
    432 |

    should have a content-box box model

    433 |
    434 |
    435 | 436 |
    437 |
    438 |

    should not have a cancel button in Safari or Chrome

    439 |
    440 | 441 |
    442 | 443 |

    fieldset

    444 |

    should have consistent border, padding, and margin

    445 |
    446 |
    447 |
    448 |
    449 |
    450 | 451 |

    legend

    452 |

    should inherit color

    453 |
    454 |
    455 | legend 456 |
    457 |
    458 |

    should not have padding

    459 |
    460 |
    461 | legend 462 |
    463 |
    464 | 465 |

    textarea

    466 |

    should not have a scrollbar unless overflowing

    467 |
    468 | 469 |
    470 | 471 |

    table

    472 |

    should not have spaces between cells

    473 |
    474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 |
    Jimi Hendrix - albums
    AlbumYearPrice
    AlbumYearPrice
    Are You Experienced1967$10.00
    Axis: Bold as Love1967$12.00
    Electric Ladyland1968$10.00
    Band of Gypsys1970$12.00
    513 |
    514 | 515 |
    516 | --------------------------------------------------------------------------------