postcss-epub-clean

2.2.5 • Public • Published

postcss-epub-clean Build Status

PostCSS plugin to produce valid epub3 css.

See the EPUB 3 CSS Profile for more information.

See postcss-epub if you're only wishing to add prefixed css properties.

@font-face requires both font-weight and font-style, so both are set to "normal" if not present (it's not clear in the spec, but required in some readers).

The "-epub-" prefix is added to anything needing it per the spec and all non "-epub-*" prefixes are removed.

Note: This will leave the unprefixed property.

Installation

$ npm install postcss-epub-clean

Usage

// dependencies
var fs = require("fs")
var postcss = require("postcss")
var epub = require("postcss-epub-clean")
 
// css to be processed
var css = fs.readFileSync("input.css", "utf8")
 
// process css
var output = postcss()
  .use(epub)
  .process(css)
  .css

License

Package Sidebar

Install

npm i postcss-epub-clean

Weekly Downloads

0

Version

2.2.5

License

MIT

Last publish

Collaborators

  • rycochet