append-css
1.1.2 • Public • Published append-css
Append css rule to document.
This is wrapper for <style></style>
element.
<script src="./browser/build.js"></script>
<script>
const AppendCss = require('append-css');
let appendedRules = new AppendCss(`
body {
background: black;
}
`);
appendedRules.disable();
appendedRules.textContent = `
body {
width: 100%;
}
`;
appendedRules.enable();
appendedRules.dispose();
</script>
options
constructor(cssText, options);
prepend
Append <style></style>
element to before document.head.firstChild
.
Package Sidebar
Install
Weekly Downloads