Skip to content

Commit

Permalink
Clearify readme for golden-ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil LaPier committed Jul 4, 2011
1 parent d7b55b2 commit d439ec2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
17 changes: 8 additions & 9 deletions app/assets/stylesheets/functions/_golden-ratio.css.scss
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@
@return $value; @return $value;
} }


// Must provide a Pixel or Em value.
// Also requires an increment value: ...-3, -2, -1, 1, 2, 3...
// Can be used with ceil(round up) or floor(round down).
// div { // div {
// Increment Up Golden Ratio // Increment Up GR with positive value
// width: golden-ratio(14px, 1); // returns: 22.652px // width: golden-ratio(14px, 1); // returns: 22.652px
// width: floor( golden-ratio(14px, 1) ); // returns: 22px
// width: ceil( golden-ratio(14px, 1) ); // returns: 23px
// //
// Increment Down Golden Ratio // Increment Down GR with negative value
// width: golden-ratio(14px, -1); // returns: 8.653px // width: golden-ratio(14px, -1); // returns: 8.653px
//
// Can be used with ceil(round up) or floor(round down)
// width: floor( golden-ratio(14px, 1) ); // returns: 22px
// width: ceil( golden-ratio(14px, 1) ); // returns: 23px
// } // }
// //
// modularscale.com // modularscale.com
Expand Down
11 changes: 6 additions & 5 deletions readme.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -173,15 +173,16 @@ The compact function will strip out any value from a list that is 'false'. Takes


Returns the golden ratio of a given number. Must provide a Pixel or Em value for first argument. Also takes a required increment value that is not zero and an integer: ...-3, -2, -1, 1, 2, 3... Returns the golden ratio of a given number. Must provide a Pixel or Em value for first argument. Also takes a required increment value that is not zero and an integer: ...-3, -2, -1, 1, 2, 3...


# Can be used with ceil(round up) or floor(round down).
div { div {
Increment Up Golden Ratio Increment Up GR with positive value
width: golden-ratio(14px, 1); // returns: 22.652px width: golden-ratio(14px, 1); // returns: 22.652px
width: floor( golden-ratio(14px, 1) ); // returns: 22px
width: ceil( golden-ratio(14px, 1) ); // returns: 23px


Increment Down Golden Ratio Increment Down GR with negative value
width: golden-ratio(14px, -1); // returns: 8.653px width: golden-ratio(14px, -1); // returns: 8.653px

Can be used with ceil(round up) or floor(round down)
width: floor( golden-ratio(14px, 1) ); // returns: 22px
width: ceil( golden-ratio(14px, 1) ); // returns: 23px
} }


Resources: [modularscale.com](http://modularscale.com) & [goldenratiocalculator.com](goldenratiocalculator.com) Resources: [modularscale.com](http://modularscale.com) & [goldenratiocalculator.com](goldenratiocalculator.com)
Expand Down

0 comments on commit d439ec2

Please sign in to comment.