JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10
  • Score
    100M100P100Q11663F
  • License MIT

Inline stylesheets using @import

Package Exports

  • rework-inline

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rework-inline) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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