rework-inline

Inline stylesheets using @import

MIT 6 个版本
安装
npm install rework-inline
yarn add rework-inline
pnpm add rework-inline
bun add rework-inline
README

rework-inline Build Status

Inline stylesheets using @import

Install

$ npm install --save rework-inline

Usage

@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 © Kevin Mårtensson

版本列表
0.2.0 2014-05-30
0.1.4 2014-03-05
0.1.3 2014-02-15
0.1.2 2014-01-24
0.1.1 2013-12-18
0.1.0 2013-09-12