npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

modern-normalize-css

v1.0.3

Published

A modernized version of normalize.css

Downloads

46

Readme

modern-normalize-css v1.0.3

Normalize Logo

A MODERN alternative to CSS resets - This is a fork inspired by the original normalize.css created by Nicolas Gallagher and Jonathan Neal over 8 years ago with some modernized changes to improve readability, compatibility with modern browsers, and to simplify the codebase.

license

Manual

NPM

npm install modern-normalize-css

Yarn

yarn add modern-normalize-css

Bun

bun add modern-normalize-css

Simply copy the styles/normalize.css file to your project and use it as you would the original normalize.css file in the root of the project.

Usage

Import in CSS

Add the following line to your main CSS file:

@import "modern-normalize-css/styles/normalize.css";

Import in JavaScript/TypeScript

Add the following line to your main JavaScript or TypeScript file:

import "modern-normalize-css/styles/normalize.css";

Download

GitHub: https://github.com/parksthecoder/modern-normalize-css

NPM: https://www.npmjs.com/package/modern-normalize-css

See (for older Original normalize.css version) https://necolas.github.io/normalize.css/latest/normalize.css

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 modifications.
  • Explains what code does using detailed comments.

Modern Browser support

  • Chrome
  • Edge
  • Firefox ESR+
  • Internet Explorer 10+
  • Safari 8+
  • Opera

Extended details and known issues

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).

button, [type="button"], [type="reset"], [type="submit"]

Correct the inability to style clickable types in iOS and Safari. Remove the inner border and padding in Firefox.

fieldset

Correct the padding in Firefox.

legend

Correct the text wrapping in Edge and IE. Correct the color inheritance from fieldset elements in IE. Remove the padding so developers are not caught out when they zero out fieldset elements in all browsers.

progress

Add the correct vertical alignment in Chrome, Firefox, and Opera.

textarea

Remove the default vertical scrollbar in IE 10+.

details, summary

Add the correct display in Edge, IE 10+, Firefox, and all browsers for details and summary.

template, [hidden]

Add the correct display in IE 10+ for template and elements with the hidden attribute.

Changes in this version

  • Updated Line-Height: Changed from 1.5 to 1.375rem for better readability.
  • Safe Area Insets: Added support for safe area insets to accommodate devices with notches or rounded corners.
  • Font Definitions: Updated root-level font definitions for a more modern and consistent look.
  • Consistent Line-Height: Ensured consistent line-height across various elements.
  • Modern Browser Features: Considered modern browser features and compatibility.
  • Detailed Comments: Added detailed comments to explain the purpose of each rule.

Comparison with Old Normalize.css (v8.0.1)

  • Line-Height: Updated from 1.5 to 1.375rem for improved readability.
  • Safe Area Insets: Added padding for safe area insets to support modern devices.
  • Font Definitions: Modernized font definitions for better consistency.
  • Consistent Line-Height: Applied consistent line-height across all elements.
  • Modern Browser Features: Enhanced support for modern browser features.
  • Detailed Comments: Improved comments for better understanding and maintainability.