Socket
Socket
Sign inDemoInstall

normalize.css

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    normalize.css

Make CSS consistent cross-browser


Version published
Weekly downloads
933K
decreased by-12.36%
Maintainers
1
Install size
24.7 kB
Created
Weekly downloads
 

Package description

What is normalize.css?

The npm package normalize.css is a modern, HTML5-ready alternative to CSS resets. It makes browsers render all elements more consistently and in line with modern standards by precisely targeting only the styles that need normalizing.

What are normalize.css's main functionalities?

HTML Element Normalization

Ensures consistent line height and prevents font size adjustments after device orientation changes.

/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* Document
   ========================================================================== */
/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 */
html {
  line-height: 1.15; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
}

Section and Article Styles

Removes default margins from the body and ensures the 'main' element is displayed consistently across browsers.

/* Sections
   ========================================================================== */
/**
 * Remove the margin in all browsers.
 */
body {
  margin: 0;
}

/**
 * Render the 'main' element consistently in IE.
 */
main {
  display: block;
}

Text-Level Semantics

Adjusts box sizing and border color inheritance in Firefox for elements like <hr>.

/* Grouping content
   ========================================================================== */
/**
 * Add the correct box sizing in Firefox.
 * Correct the inheritance of border color in Firefox. (Bug 688556)
 */
hr {
  box-sizing: content-box; /* 1 */
  height: 0; /* 1 */
  overflow: visible; /* 2 */
}

Other packages similar to normalize.css

Readme

Source

normalize.css

Normalize.css is a customisable CSS file that makes browsers render all elements more consistently and in line with modern standards. We researched the differences between default browser styles in order to precisely target only the styles that need normalizing.

Check out the demo

What does it do?

  • Preserves useful defaults, unlike many CSS resets.
  • Normalizes styles for a wide range of elements.
  • Corrects bugs and common browser inconsistencies.
  • Improves usability with subtle improvements.
  • Explains what code does using detailed comments.

How to use it

Normalize.css is intended to be used as an alternative to CSS resets.

It is suggested that you read through the normalize.css file and customise it to meet the design requirements of a project rather including it as a "black box".

If you prefer to use a different CSS formatting style, consider using a tool like Procssor.

If you would like to minify the file, you can use a tool like this online CSS compressor using YUI Compressor or perform the minification as part of your build process.

Browser support

  • Google Chrome
  • Mozilla Firefox 3+
  • Apple Safari 4+
  • Opera 10+
  • Internet Explorer 6+

Contribute

Please read the Wiki entry on contributing to Normalize.css

License

Public domain

Acknowledgements

Normalize.css is a project by Nicolas Gallagher and Jonathan Neal.

FAQs

Last updated on 08 Jun 2012

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc