css-golden-ratio
v1.0.0
Published
Font size, line height, and line width the golden ratio way.
Downloads
15
Maintainers
Readme
css-golden-ratio
Font size, line height, and line width the golden ratio way.
- Made for CSS-in-JS tools
- Works with any unit (e.g.
px
,em
,rem
,%
) - Inspired by Kareem Elansary
Usage:
const { lineWidth, lineHeight } = require('css-golden-ratio');
const styles = {
p {
font-size: `${14}px`;
max-width: `${lineWidth(14)}px`;
line-height: `${lineHeight(14)}px`;
}
}