0.1.3 • Published 3 years ago

hyperhtml-style v0.1.3

Weekly downloads
2,277
License
ISC
Repository
github
Last release
3 years ago

hyperHTML Style

Build Status Coverage Status Greenkeeper badge WebReflection status

The hyperHTML's html/svg style updater.

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;