Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-epub

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-epub

PostCSS plugin to prefix ePub3 properties

  • 3.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-54.55%
Maintainers
1
Weekly downloads
 
Created
Source

postcss-epub Build Status

PostCSS plugin to give correct ePub3 css output.

See the EPUB 3 CSS Profile for more information.

Installation

$ npm install postcss-epub

Options

  • fonts:true - This will ensure fonts have the correct font-weight and font-style defaults. This will also throw an error if any there is not a valid font source format (opentype or woff).
  • strip:true - This will strip any non -epub- prefixes.
  • strict:true - Implies all other options are set.

Usage

postcss([ require("postcss-epub") ])
// or
postcss([ require("postcss-epub")({strict:true}) ])

See PostCSS docs for examples for your environment.

Example

@font-face {
	font-family: 'Fake Font';
	src: local('Fake Font'),
		url('path/to/font.woff') format('woff'),
		url('path/to/font.ttf') format('truetype'),
		url('path/to/font.otf') format('opentype');
}

stuff {
	dont: care;
	hyphens: all;
	line-break: normal;
	text-align-last: center;
	text-emphasis: red triangle;
	text-emphasis-color: red;
	text-emphasis-style: triangle;
	word-break: break-all;
	-webkit-prefix: something;
}
@font-face {
	font-family: 'Fake Font';
	src: local('Fake Font'),url('path/to/font.woff') format('woff'),url('path/to/font.otf') format('opentype');
	font-weight: normal;
	font-style: normal;
}

stuff {
	dont: care;
	-epub-hyphens: all;
	hyphens: all;
	-epub-line-break: normal;
	line-break: normal;
	-epub-text-align-last: center;
	text-align-last: center;
	-epub-text-emphasis: red triangle;
	text-emphasis: red triangle;
	-epub-text-emphasis-color: red;
	text-emphasis-color: red;
	-epub-text-emphasis-style: triangle;
	text-emphasis-style: triangle;
	-epub-word-break: break-all;
	word-break: break-all;
}

License

Keywords

FAQs

Package last updated on 29 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc