PostCSS plugin to use vertical rhythm by providing a unit-agnostic vr() function.
MIT License
PostCSS plugin to use vertical rhythm by providing a unit-agnostic vr() function.
How is this different from postcss-vertical-rhythm?
vr()
is unitless.line-height
or font
to define your line-height.font-size
is unknown and cannot be used to compute an exact vertical rhythm during build time.body {
font-size: 100%;
line-height: 2;
}
.test {
padding: vr(1)rem;
}
body {
font-size: 100%;
line-height: 2;
}
.test {
padding: 2rem;
}
postcss([ require('postcss-vertical-rhythm-function') ])
See PostCSS docs for examples for your environment.