css-steal

1.0.4 • Public • Published

CSS steal

Given DOM element returns styles applied to it and all its children.

Installation

npm install css-steal

Usage

var CSSSteal = require('css-steal');
var css = CSSSteal(document.querySelector('.my-class'));
css.toCSSText(); // produces formatted CSS styles
css.toJS(): // returns an array of objects containing the styles

CSSSteal accepts multiple DOM elements. For example:

var a = document.querySelector('.a-class');
var b = document.querySelector('.b-class');
var c = document.querySelector('.c-class');
 
var css = CSSSteal(a, b, c);

It merges the CSS used by the elements.

Chrome extension

Download here.

CSSSteal

Development

npm run dev

Resources

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.43latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.43
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i css-steal

Weekly Downloads

3

Version

1.0.4

License

MIT

Last publish

Collaborators

  • krasimir