| 1 | # @csstools/normalize.css [<img src="https://csstools.github.io/normalize.css/logo.svg" alt="normalize" width="90" height="90" align="right">][@csstools/normalize.css]
|
|---|
| 2 |
|
|---|
| 3 | [@csstools/normalize.css] is a CSS library that provides consistent,
|
|---|
| 4 | cross-browser default styling of HTML elements.
|
|---|
| 5 |
|
|---|
| 6 | ## Usage
|
|---|
| 7 |
|
|---|
| 8 | ```html
|
|---|
| 9 | <link href="https://unpkg.com/@csstools/normalize.css" rel="stylesheet" />
|
|---|
| 10 | ```
|
|---|
| 11 |
|
|---|
| 12 | ## Install
|
|---|
| 13 |
|
|---|
| 14 | ```sh
|
|---|
| 15 | npm install @csstools/normalize.css --save
|
|---|
| 16 | ```
|
|---|
| 17 |
|
|---|
| 18 | #### Webpack Usage
|
|---|
| 19 |
|
|---|
| 20 | Import [@csstools/normalize.css] in CSS:
|
|---|
| 21 |
|
|---|
| 22 | ```css
|
|---|
| 23 | @import '~@csstools/normalize.css';
|
|---|
| 24 | ```
|
|---|
| 25 |
|
|---|
| 26 | Alternatively, import [@csstools/normalize.css] in JS:
|
|---|
| 27 |
|
|---|
| 28 | ```js
|
|---|
| 29 | import '@csstools/normalize.css';
|
|---|
| 30 | ```
|
|---|
| 31 |
|
|---|
| 32 | In `webpack.config.js`, use the appropriate loaders:
|
|---|
| 33 |
|
|---|
| 34 | ```js
|
|---|
| 35 | module.exports = {
|
|---|
| 36 | module: {
|
|---|
| 37 | rules: [
|
|---|
| 38 | {
|
|---|
| 39 | test: /\.css$/,
|
|---|
| 40 | use: [ 'style-loader', 'css-loader' ]
|
|---|
| 41 | }
|
|---|
| 42 | ]
|
|---|
| 43 | }
|
|---|
| 44 | }
|
|---|
| 45 | ```
|
|---|
| 46 |
|
|---|
| 47 | **Download**
|
|---|
| 48 |
|
|---|
| 49 | See https://csstools.github.io/normalize.css/latest/normalize.css
|
|---|
| 50 |
|
|---|
| 51 | ## What does it do?
|
|---|
| 52 |
|
|---|
| 53 | * Normalizes styles for a wide range of elements.
|
|---|
| 54 | * Corrects bugs and common browser inconsistencies.
|
|---|
| 55 | * Explains what code does using detailed comments.
|
|---|
| 56 |
|
|---|
| 57 | ## Browser support
|
|---|
| 58 |
|
|---|
| 59 | * Chrome (last 3)
|
|---|
| 60 | * Edge (last 3)
|
|---|
| 61 | * Firefox (last 3)
|
|---|
| 62 | * Firefox ESR
|
|---|
| 63 | * Opera (last 3)
|
|---|
| 64 | * Safari (last 2)
|
|---|
| 65 | * iOS Safari (last 2)
|
|---|
| 66 |
|
|---|
| 67 | ## Contributing
|
|---|
| 68 |
|
|---|
| 69 | Please read the [contribution guidelines](CONTRIBUTING.md) in order to make the
|
|---|
| 70 | contribution process easy and effective for everyone involved.
|
|---|
| 71 |
|
|---|
| 72 | ## Similar Projects
|
|---|
| 73 |
|
|---|
| 74 | - [modern-normalize.css](https://github.com/sindresorhus/modern-normalize) - An
|
|---|
| 75 | alternative to normalize.css, adhering to a minimal set of normalizations and
|
|---|
| 76 | common developer expectations and preferences.
|
|---|
| 77 | - [opinionate.css](https://github.com/adamgruber/opinionate.css) - A supplement
|
|---|
| 78 | to normalize.css with opinionated rules.
|
|---|
| 79 | - [remedy.css](https://github.com/mozdevs/cssremedy) - An alternative to
|
|---|
| 80 | normalize.css, adhering to different common developer expectations and
|
|---|
| 81 | preferences.
|
|---|
| 82 | - [sanitize.css](https://github.com/csstools/sanitize.css) - An alternative to
|
|---|
| 83 | normalize.css, adhering to common developer expectations and preferences.
|
|---|
| 84 |
|
|---|
| 85 | ## Differences from `necolas/normalize.css`
|
|---|
| 86 |
|
|---|
| 87 | Nicolas Gallagher and I started writing normalize.css together. I named and
|
|---|
| 88 | created the normalize.css repository with the help of Paul Irish and Ben Alman.
|
|---|
| 89 | I transferred the repository to Nicolas, who turned it into a “household” CSS
|
|---|
| 90 | library.
|
|---|
| 91 |
|
|---|
| 92 | Later, I resumed authorship of normalize.css with Luciano Battagliero. Together,
|
|---|
| 93 | we tagged, deprecated, and removed “opinionated” styles — styles developers
|
|---|
| 94 | often prefer but which do not fix bugs or “normalize” browser differences.
|
|---|
| 95 |
|
|---|
| 96 | Later, Nicolas resumed authorship and the issue of whether to include or omit
|
|---|
| 97 | the opinionated styles forced us to split.
|
|---|
| 98 |
|
|---|
| 99 | I continue working on the normalize.css project, currently under the “csstools”
|
|---|
| 100 | tag. I hope one day our differences are resolved and the projects are one again.
|
|---|
| 101 |
|
|---|
| 102 | ## Acknowledgements
|
|---|
| 103 |
|
|---|
| 104 | normalize.css is a project by [Jonathan Neal](https://github.com/jonathantneal),
|
|---|
| 105 | co-created with [Nicolas Gallagher](https://github.com/necolas).
|
|---|
| 106 |
|
|---|
| 107 | [@csstools/normalize.css]: https://github.com/csstools/normalize.css
|
|---|