dntly-cssjson
v3.2.1
Published
Convert CSS <> JSON for use as custom styles in a Donately Donation Form
Downloads
19
Maintainers
Readme
Donately CssJson
Convert CSS <> JSON && JSON <> CSS
For use as custom styles in a Donately Donation Form from Donately
Install
npm install dntly-cssjson
Usage
const DntlyCssJson = require('dntly-cssjson');
const myCss = `body {
font-weight: bold;
}
h1 {
font-size: 2em;
}
`
const myJson = { body: { 'font-weight': 'bold' }, h1: { 'font-size': '2em' } }
const convertedJson = DntlyCssJson.cssToJson(myCss)
const convertedCss = DntlyCssJson.jsonToCss(myJson)