a simple tool to help you using inline-styles with react
$ npm install --save stile
import {
createStyleSheet,
em,
rem,
percent,
deg,
vw,
vh,
join,
list,
} from "stile"
Prefixes and freezes your style declaration.
const styles = createStyleSheet({
title: {
color: "red",
},
})
Adds the em
unit to your value
em(1.5) // "1.5em"
Adds the rem
unit to your value
rem(1.5) // "1.5rem"
Adds the %
unit to your value
percent(1.5) // "1.5%"
Adds the deg
unit to your value
deg(1.5) // "1.5deg"
Adds the vw
unit to your value
vw(1.5) // "1.5vw"
Adds the vh
unit to your value
vh(1.5) // "1.5vh"
Joins values with a space
join(0, 0, rem(1)) // "0 0 1rem"
Joins values with a comma
list("300ms linear color", "200ms linear height") // "300ms linear color, 200ms linear height"