hyperhtml-style

0.1.3 • Public • Published

hyperHTML Style

Build Status Coverage Status Greenkeeper badge WebReflection status

The hyperHTML's html/svg style updater.

  • CDN as global utility, via https://unpkg.com/hyperhtml-style
  • ESM via import hyperStyle from 'hyperhtml-style'
  • CJS via const hyperStyle = require('hyperhtml-style')

Live test

Example

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;

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.3
    1,964
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.3
    1,964
  • 0.1.2
    625
  • 0.1.1
    7

Package Sidebar

Install

npm i hyperhtml-style

Weekly Downloads

2,054

Version

0.1.3

License

ISC

Unpacked Size

12 kB

Total Files

7

Last publish

Collaborators

  • webreflection