@drazik/normalize.scss

A wrapper around normalize.css to make it importable easily with Sass

Stats

StarsIssuesVersionUpdatedCreatedSize
@drazik/normalize.scss
004.1.15 years ago5 years agoMinified + gzip package size for @drazik/normalize.scss in KB

Readme

normalize.scss

This repository is just a wrapper around normalize.css, a project by Nicolas Gallagher.

** I am NOT the author of normalize.css, Nicolas Gallagher IS. **

Why a wrapper ?

Because normalize.css is awesome, but you can't inline @import it in your Sass project. This is the only goal of this wrapper : make normalize.css "@importable" in your Sass code using LibSass.

I can see a lot of other wrappers around here...

Yes, but the majority doesn't address the @import issue. And others don't follow normalize.css' semantic versioning, which can lead to some issues.

The intent of this wrapper

The goal here is clear :

  • Make normalize.css compatible with Sass inline @import
  • Follow normalize.css release versions

This way, you can use normalize.css in your Sass code like you would do in plain CSS.

How to use

Install

npm install --save @drazik/normalize.scss

Update your node-sass configuration

Add the path to the package to the includePaths parameter of node-sass.

For example, if you use gulp and gulp-sass :

const gulp = require("gulp");
const sass = require("gulp-sass");

gulp.task("styles", () => {
    return gulp.src("scss/*.scss")
        .pipe(sass({
            includePaths: require("normalize.scss").includePaths
        }))
        .pipe(gulp.dest("css"));
});

Import it !

In your SCSS code :

@import "normalize";

Contribute

You can submit issues and pull requests, but remember that this is just a wrapper around the original project : normalize.css. So, if you have an issue with the CSS itself or if you want to add some features, you must refer to normalize.css issues and submit a PR to this original repository, not here.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.