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

normalize-scss

v8.0.0

Published

This is the Sass version of Normalize.css, a collection of HTML element and attribute rulesets to normalize styles across all browsers. This port aims to use a light dusting of Sass to make Normalize even easier to integrate with your website.

Downloads

181,021

Readme

normalize-scss

Latest versions

| For use with… | normalize-scss version | |------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| | The latest Sass | 8.0.0 combining normalize.css v8.0.0 with v1.1.3 | | Compass or Bower | 7.0.1 combining normalize.css v7.0.0 with v1.1.3 (last version with Compass and Bower support) | | Ruby Sass 3.3 | 3.0.3 combining normalize.css v3.0.3 with v1.1.3 | | Ruby Sass 3.2 | 2.2.0+normalize.2.1.3 combining normalize.css v2.1.3 with v1.1.3 |

The Sass port of normalize.css

This project is the Sass version of Normalize.css, a collection of HTML element and attribute rulesets to normalize styles across all browsers. This port aims to use a light dusting of Sass to make Normalize even easier to integrate with your website. To learn about why Normalize.css is so amazing, skip to the "normalize.css" section below.

This Sass port currently adds:

  • Vertical rhythm mixins: Allowing you to alter the font-size, line-height and margins in Normalize’s output without hacking the library.
  • A ready-to-fork version.

normalize.css v8

A modern alternative to CSS resets

Normalize.css is a customisable CSS file that makes browsers render all elements more consistently and in line with modern standards.

The project relies on researching the differences between default browser styles in order to precisely target only the styles that need or benefit from normalizing.

View the test file

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.

Install

Install using one of the following methods:

  • Download directly from the project page.
  • Install with npm: npm install --save normalize-scss

How to use it

There is a fantastic introduction to the project and brief instructions how to use it in the About normalize.css article.

You can use the Sass port of Normalize in one of several methods, following the "About normalize.css" article's suggestions:

Approach 1: Download and use normalize-scss as a starting point for your own project's base Sass, customising the values to match the design's requirements. (The best approach, IMO.)

  1. Copy the normalize-scss files to your sass directory so that you can alter it as you include it in your project. To aid with this method, normalize-scss includes a ready-made "fork" version in the fork-version directory.

Approach 2: Install and include normalize-scss untouched and then build upon it, overriding the defaults later in your Sass when necessary. Just import normalize-scss like any normal Sass module by:

  1. Set variables to override the default normalize-scss variables.
  2. (Optionally) add an additional node_modules/normalize-scss/sass import path for your application's Sass compiler or loader, e.g. PostCSS or webpack's sass-loader.
  3. Import with @import "normalize"; or with @import "node_modules/normalize-scss/sass/normalize"; (if you skipped step 2.)
  4. Output the CSS rules with @include normalize();

Alternatively, you can import normalize-scss immediately into your main Sass file without needing to use the normalize() mixin by:

  1. (Optionally) set variables to override the default normalize-scss variables.
  2. (Optionally) add an additional node_modules/normalize-scss/sass import path for your application's Sass compiler or loader, e.g. PostCSS or webpack's sass-loader.
  3. Import with @import "normalize/import-now"; or with @import "node_modules/normalize-scss/sass/normalize/import-now"; (if you skipped step 2.)

Browser support

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

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 Normalize.css' contributing guidelines.

Updates to most CSS rules should be reported to the upstream Normalize.css project. Updates to the Sass should be reported in the Normalize-scss project.

Acknowledgements

Normalize.css is a project by Nicolas Gallagher, co-created with Jonathan Neal.

This Sass port is a project by John Albin Wilkins.

Other ports of Normalize.css

For the record, there are several other Sass ports as well. Including:

  • https://github.com/waynegraham/compass-normalize-plugin
  • https://github.com/ksmandersen/compass-normalize
  • https://github.com/hail2u/normalize.scss
  • https://github.com/kristerkari/normalize.scss
  • https://github.com/krisbulman/normalize-libsass