css-scoper

1.0.2 • Public • Published

Scoper

A polyfill for scoped HTML style elements.

Quick Start

Just include scoper.js on your page to start using scoped HTML style elements.

Install via npm: npm install css-scoper

How It Works

Each <style scoped> element's parent is wrapped with a span that is given a unique ID. Its rules are moved to head and all selectors prepended with their respective ID.

Scoper is only active when the page contains scoped styles and the browser doesn't support them.

Tests

Tests can be run with the command mocha test/test.js.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.272latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.272

Package Sidebar

Install

npm i css-scoper

Weekly Downloads

72

Version

1.0.2

License

MIT

Last publish

Collaborators

  • thomaspark