Skip to content
Permalink
Newer
Older
100644 102 lines (67 sloc) 3.14 KB
1
# normalize.css
Apr 28, 2011
2
3
<a href="https://github.com/necolas/normalize.css"><img
4
src="https://necolas.github.io/normalize.css/logo.svg" alt="Normalize Logo"
5
width="80" height="80" align="right"></a>
Apr 28, 2011
6
7
> A modern alternative to CSS resets
Apr 28, 2011
8
9
[![npm][npm-image]][npm-url] [![license][license-image]][license-url]
10
[![changelog][changelog-image]][changelog-url]
11
[![gitter][gitter-image]][gitter-url]
14
**NPM**
16
```sh
17
npm install --save normalize.css
18
```
19
20
**CDN**
21
22
See https://yarnpkg.com/en/package/normalize.css
23
24
**Download**
25
26
See https://necolas.github.io/normalize.css/latest/normalize.css
Feb 17, 2014
27
Aug 7, 2012
29
## What does it do?
30
31
* Preserves useful defaults, unlike many CSS resets.
32
* Normalizes styles for a wide range of elements.
33
* Corrects bugs and common browser inconsistencies.
Mar 24, 2016
34
* Improves usability with subtle modifications.
35
* Explains what code does using detailed comments.
36
Aug 7, 2012
38
## Browser support
Apr 28, 2011
39
40
* Chrome
41
* Edge
42
* Firefox ESR+
43
* Internet Explorer 10+
44
* Safari 8+
45
* Opera
47
48
## Extended details and known issues
49
50
Additional detail and explanation of the esoteric parts of normalize.css.
51
52
#### `pre, code, kbd, samp`
53
54
The `font-family: monospace, monospace` hack fixes the inheritance and scaling
55
of font-size for preformatted text. The duplication of `monospace` is
56
intentional. [Source](https://en.wikipedia.org/wiki/User:Davidgothberg/Test59).
57
58
#### `sub, sup`
59
60
Normally, using `sub` or `sup` affects the line-box height of text in all
61
browsers. [Source](https://gist.github.com/413930).
63
#### `select`
65
By default, Chrome on OS X and Safari on OS X allow very limited styling of
66
`select`, unless a border property is set. The default font weight on `optgroup`
67
elements cannot safely be changed in Chrome on OSX and Safari on OS X.
68
69
#### `[type="checkbox"]`
70
71
It is recommended that you do not style checkbox and radio inputs as Firefox's
72
implementation does not respect box-sizing, padding, or width.
73
74
#### `[type="number"]`
75
76
Certain font size values applied to number inputs cause the cursor style of the
77
decrement button to change from `default` to `text`.
78
79
#### `[type="search"]`
80
81
The search input is not fully stylable by default. In Chrome and Safari on
82
OSX/iOS you can't control `font`, `padding`, `border`, or `background`. In
83
Chrome and Safari on Windows you can't control `border` properly. It will apply
84
`border-width` but will only show a border color (which cannot be controlled)
85
for the outer 1px of that border. Applying `-webkit-appearance: textfield`
86
addresses these issues without removing the benefits of search inputs (e.g.
87
showing past searches).
89
## Contributing
91
Please read the [contribution guidelines](CONTRIBUTING.md) in order to make the
92
contribution process easy and effective for everyone involved.
93
94
95
[changelog-image]: https://img.shields.io/badge/changelog-md-blue.svg?style=flat-square
96
[changelog-url]: CHANGELOG.md
97
[license-image]: https://img.shields.io/npm/l/normalize.css.svg?style=flat-square
98
[license-url]: LICENSE.md
99
[npm-image]: https://img.shields.io/npm/v/normalize.css.svg?style=flat-square
100
[npm-url]: https://www.npmjs.com/package/normalize.css
101
[gitter-image]: https://img.shields.io/badge/chat-gitter-blue.svg?style=flat-square
102
[gitter-url]: https://gitter.im/necolas/normalize.css