0.0.7 • Published 8 years ago
fis-parser-inlinecss v0.0.7
fis-parser-inlinecss
fis.match('*.js', {
parser: [
fis.plugin('inlinecss')
]
})
a.css
body {font-size:12px;}
a.js
__css("./a.css");
output: a.js
;(function (content) {
var head = document.getElementsByTagName("head")[0] || document.documentElement;
var sty = document.createElement("style");
sty.type = "text/css";
// IE
if (sty.styleSheet) {
sty.styleSheet.cssText = content;
} else {
sty.innerHTML = content;
}
head.appendChild(sty);
})("body {font-size:12px;}");