package
The hyperHTML's html/svg style updater
npm install hyperhtml-styleGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 1 packages.
11.7 kB
Includes dependencies.
The hyperHTML's html/svg style updater.
import hyperStyle from 'hyperhtml-style'const hyperStyle = require('hyperhtml-style')The tagger accepts a node and returns a function that can be used to update the node style either via an object or a string.
var bodyStyle = hyperhtmlStyle(document.body);
bodyStyle({
fontFamily: 'sans-serif',
fontSize: 16,
'--cssProperty': 'value'
});
console.log(document.body.style.cssText);
// font-family: sans-serif;
// font-size: 16px;
// --cssProperty:value;