JSPM

hyperhtml-style

0.1.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8249
  • Score
    100M100P100Q134981F
  • License ISC

The hyperHTML's html/svg style updater

Package Exports

  • hyperhtml-style

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hyperhtml-style) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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;