Socket
Socket
Sign inDemoInstall

compass-vertical-rhythm

Package Overview
Dependencies
4
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    compass-vertical-rhythm

A port-in-progress of the Compass vertical rhythm library


Version published
Weekly downloads
7.3K
decreased by-8.07%
Maintainers
1
Install size
850 kB
Created
Weekly downloads
 

Readme

Source

compass-vertical-rhythm

A port-in-progress of the Compass vertical rhythm library.

Only the rhythm function has been ported atm.

Install

npm install compass-vertical-rhythm

Usage

var VerticalRhythm = require('compass-vertical-rhythm');

var rhythm = VerticalRhythm({baseFontSize: '24px', baseLineHeight: 1.5}).rhythm;

rhythm(1);
// ---> 1.25rem

rhythm(0.5);
// ---> 0.625rem

rhythm(0.25);
// ---> 0.3125rem

// Use it for React inline styles.
React.createClass({
  render: function() {
    <div style={{margin: rhythm(1)}}>
      Hello world
    </div>
  }
});

Keywords

FAQs

Last updated on 27 Apr 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc