# hyperhtml-style

> The hyperHTML's html/svg style updater

Latest version **0.1.3** (published 2021-09-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install hyperhtml-style
pnpm add hyperhtml-style
yarn add hyperhtml-style
bun add hyperhtml-style
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2021-09-07 |
| First published | 2018-11-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Andrea Giammarchi |
| Maintainers | webreflection |
| Keywords | hyperhtml, style |

## Links

- npm: https://www.npmjs.com/package/hyperhtml-style
- Repository: https://github.com/WebReflection/hyperhtml-style
- Homepage: https://github.com/WebReflection/hyperhtml-style#readme
- Issues: https://github.com/WebReflection/hyperhtml-style/issues
- npm.io page: https://npm.io/package/hyperhtml-style

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2021-09-07
- 0.1.2 — 2018-11-30
- 0.1.1 — 2018-11-29

## README

# hyperHTML Style

[![Build Status](https://travis-ci.com/WebReflection/hyperhtml-style.svg?branch=master)](https://travis-ci.com/WebReflection/hyperhtml-style) [![Coverage Status](https://coveralls.io/repos/github/WebReflection/hyperhtml-style/badge.svg?branch=master)](https://coveralls.io/github/WebReflection/hyperhtml-style?branch=master) [![Greenkeeper badge](https://badges.greenkeeper.io/WebReflection/hyperhtml-style.svg)](https://greenkeeper.io/) ![WebReflection status](https://offline.report/status/webreflection.svg)

The [hyperHTML](https://github.com/WebReflection/hyperHTML#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](https://webreflection.github.io/hyperhtml-style/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.

```js
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;
```

---
_Source: https://npm.io/package/hyperhtml-style · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
