normalize.css.styl

4.1.1 • Public • Published

normalize.css.styl

add normalize() mixin using normalize.css/normalize.css

Installation

npm install normalize.css.styl --save

or, force latest normalize.css installation using @newest.

npm install normalize.css.styl@newest --save

Usage

Via CLI

// index.styl
@import 'normalize.css.styl'
 
normalize()
stylus --use normalize.css.styl index.styl
# /* normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */ 
# /** 
#  * 1. Change the default font family in all browsers (opinionated). 
#  * 2. Prevent adjustments of font size after orientation changes in IE and iOS. 
#  */ 
# html { 
# ... 

Via API

import stylus from 'stylus';
import normalizeCssStyl from 'normalize.css.styl';
 
stylus('normalize()')
.use(normalizeCssStyl())
.import('normalize.css.styl')
.render((err, css) => {
  if (err) {
    throw err;
  }
  console.log(css);
  // /* normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
  // /**
  //  * 1. Change the default font family in all browsers (opinionated).
  //  * 2. Prevent adjustments of font size after orientation changes in IE and iOS.
  //  */
  // html {
  // ...
});

Mixins

normalize()

expand the normalize.css in the execute position.

In

@import 'normalize.css.styl'
normalize()

Out

/* normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
/**
 * 1. Change the default font family in all browsers (opinionated).
 * 2. Prevent adjustments of font size after orientation changes in IE and iOS.
 */
html {
  font-family: sans-serif; /* 1 */
  ...

In

@import 'normalize.css.styl'
#container
  normalize()

Out

/* normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
#container html {
  font-family: sans-serif; /* 1 */
  ...

Related projects

Development

Requirement global

  • NodeJS v6.2.1
  • Npm v3.9.3 (or pnpm)
git clone https://github.com/59naga/normalize.css.styl
cd normalize.css.styl
npm install
 
npm test

License

MIT

Package Sidebar

Install

npm i normalize.css.styl

Weekly Downloads

1

Version

4.1.1

License

MIT

Last publish

Collaborators

  • 59naga