Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Create rhythmic sizes from a given musical ratio
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
LICENSE
README.md
modular-scale.js
modular-scale.styl
package.json

README.md

Modular Scale

Modular Scale is a Stylus-based mixin that calculates the incremental values of the modular scale in proportion to a set size and ratio. It was inspired by and adapted from Tim Brown's modularscale.com, Scott Kellum's sassy modular scale, and Cory Simmons's Jeet. I think it's valuable enought to be a seperate module.

Usage

  1. Set the value of modular-scale to one of the following ratios:

    double_octave
    major_twelfth
    major_eleventh
    major_tenth
    octave
    major_seventh
    minor_seventh
    major_sixth
    minor_sixth
    fifth
    augmented_fourth
    fourth
    major_third
    minor_third
    major_second
    minor_second
    

    modular_scale = golden

  2. Use the ms() function to get a value in pixels:

    height: ms(0) // 16.618px
    
  3. use the msem() function to get a value in ems

    height: msem(0) //1.03em
    
Something went wrong with that request. Please try again.