goldentype

golden ratio typography for compass


Install
gem install goldentype -v 1.0.1

Documentation

Compass Golden Type

Golden Type applies "Golden Ratio Typography" outlined by @pearsonified. This Compass plugin will generate the values his calculator does.

As of Compass 0.12.rc.2 (03/11/2012), sqrt is included in the Math Helpers which makes installing this plugin unecessary.

You can now use the mixins as-is from the core and adjusted files, but I'm leaving up the documentation for anyone who hasn't or doesn't upgrade to >0.12.rc.2.

##Installation

###From the command line:

(sudo) gem install goldentype

###Add to a project:

  1. add to your config.rb

    require 'goldentype'

  2. install via command line

    compass install goldentype

  3. import to sass/scss file

    @import goldentype

##Available Defaults and Mixins

###Defaults:

####_golden-typography.sass

@import goldentype

$base-font-size: 16px
$content-width: 550px

.goldentype
  +golden-text($base-font-size, $content-width)

.goldentype-adjusted
  +golden-text-adjusted($base-font-size, $content-width)

###Mixins:

####Arguments

$font-size: Set to 0 if unknown or if you want to calculate based on content width. If no units are given, pixels will be used by default. Defaults to 16px..

$line-width: Can be ommitted if unknown or if you want to calculate based on line height. If no units are given, pixels will be used by default. Defaults to 550px.

####Golden Type using Phi

+golden-text($font-size, $line-width)

####Adjusted Golden Type

Uses adjusted ratio as outlined in article.

+golden-text-adjusted($font-size, $line-width)