css-golden-ratio

1.0.0 • Public • Published

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`;
  }
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    2

Package Sidebar

Install

npm i css-golden-ratio

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

967 B

Total Files

3

Last publish

Collaborators

  • gunar