rework-inline

Inline stylesheets using @import

npm install rework-inline
1 downloads in the last day
16 downloads in the last week
38 downloads in the last month

rework-inline Build Status

Inline stylesheets using @import.

Getting started

Install with npm: npm install rework-inline

Examples

@import "foo.css" (min-width: 25em);

body {
    background: black;
}

yields:

@media (min-width: 25em) {
    body {
        background: red;
    }

    h1 {
        color: grey;
    }
}

body {
    background: black;
}

API

inline(opts)

Import stylesheets using @import and an optional media query. Pass a string or an array of paths to the path option in where to search for stylesheets.

Options

encoding

Type: String
Default: utf8

Use if your CSS is encoded in anything other than UTF-8.

path

Type: String|Array
Default: process.cwd()

A string or an array of paths in where to look for files.

License

MIT License (c) Kevin MÃ¥rtensson

npm loves you