normalize.css README

The project's README from github.com/necolas/normalize.css. As one markdown file: README.md.

normalize.css

Normalize Logo

A modern alternative to CSS resets

npm license changelog gitter

NPM

npm install --save normalize.css

CDN

See https://yarnpkg.com/en/package/normalize.css

Download

See https://necolas.github.io/normalize.css/latest/normalize.css

What does it do?

Browser support

Extended details and known issues

Additional detail and explanation of the esoteric parts of normalize.css.

pre, code, kbd, samp

The font-family: monospace, monospace hack fixes the inheritance and scaling of font-size for preformatted text. The duplication of monospace is intentional. Source.

sub, sup

Normally, using sub or sup affects the line-box height of text in all browsers. Source.

select

By default, Chrome on OS X and Safari on OS X allow very limited styling of select, unless a border property is set. The default font weight on optgroup elements cannot safely be changed in Chrome on OSX and Safari on OS X.

[type="checkbox"]

It is recommended that you do not style checkbox and radio inputs as Firefox's implementation does not respect box-sizing, padding, or width.

[type="number"]

Certain font size values applied to number inputs cause the cursor style of the decrement button to change from default to text.

[type="search"]

The search input is not fully stylable by default. In Chrome and Safari on OSX/iOS you can't control font, padding, border, or background. In Chrome and Safari on Windows you can't control border properly. It will apply border-width but will only show a border color (which cannot be controlled) for the outer 1px of that border. Applying -webkit-appearance: textfield addresses these issues without removing the benefits of search inputs (e.g. showing past searches).

Contributing

Please read the contribution guidelines in order to make the contribution process easy and effective for everyone involved.

normalize.css (necolas/normalize.css)

Searching Database…

What is this?normalize.css is a stylesheet that makes the default styling of HTML elements consistent across browsers; the README bills it as a modern alternative to CSS resets.
How is its approach different from a classic CSS reset?Many resets strip nearly all default styling; this one preserves useful defaults, corrects bugs and common browser inconsistencies, and adds subtle usability improvements.
How do I add it to my project?Take the stylesheet from npm, a CDN, or the download link in the README, and include it in your pages like any other CSS file.
Are there form controls I should not bother styling?Yes — skip custom styles for checkboxes and radios, since Firefox ignores box-sizing, padding and width on them; search inputs also stay partly unstylable without -webkit-appearance: textfield.
Which browsers does it cover?The README lists Chrome, Edge, Firefox ESR and newer, Internet Explorer 10+, Safari 8+, and Opera.
Is the file readable, or do I need external docs to understand it?It is meant to be read: the README counts explaining what the code does with detailed comments among its features, so every normalization carries its rationale inline.
Why is monospace listed twice in the font stack for code blocks?The duplication is an intentional hack that fixes how font-size is inherited and scaled for preformatted text like pre, code, kbd, and samp.
Can I restyle dropdowns and optgroups freely?Not fully — Chrome and Safari on OS X restrict select styling unless a border property is set, and the optgroup font weight cannot safely be changed in those browsers.
Creator
necolas
Size
0.4 MB
Stars
53.5K
Updated
CommitNov 05
Age
15y
Commits · 90 Days