Project

goldentype

0.0
No commit activity in last 3 years
No release in over 3 years
golden ratio typography for compass
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.11
 Project Readme

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)