0.0.5 • Published 8 years ago

inline-style-loader v0.0.5

Weekly downloads
251
License
MIT
Repository
github
Last release
8 years ago

inline-style-loader

A webpack loader that imports a css file and converts it to be used as an inline style

Build Status Dependencies

Usage

.selector {
    color: red;
    background-color: blue;
}
element = document.createElement('div');
element.setAttribute('style', 
    require('raw!inline-style!./some-inline-style.css')['.selector']
);
<div style="color: red; background-color: blue;"></div>

Check the demo for a more complete example

Limitations

Because the css is inlined, pseudo classes (:hover, :active, ...) can't be supported.

0.0.5

8 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago