$ cnpm install stiletto
Given HTML, stiletto will inline your CSS properties into the style attribute.
$ npm i stiletto
import * as stiletto from "stiletto"
const html = "<p> ... </p>"
const css = "p { color: red }"
console.log(stiletto.inline(html, css))
// <p style="color:red;">...</p>
Copyright (c) 2022 TANIGUCHI Masaya. All rights reserved. This package is released under MIT License. https://git.io/mit-license
Copyright 2013 - present © cnpmjs.org | Home |