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

/css-golden-ratio/

    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