Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clearify readme for golden-ratio

  • Loading branch information...
commit d439ec27b85eecde7a2916c5058a4e8c6a56c47f 1 parent d7b55b2
Phil LaPier authored
View
17 app/assets/stylesheets/functions/_golden-ratio.css.scss
@@ -16,17 +16,16 @@
@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 {
-// Increment Up Golden Ratio
-// 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 Up GR with positive value
+// width: golden-ratio(14px, 1); // returns: 22.652px
//
-// Increment Down Golden Ratio
-// width: golden-ratio(14px, -1); // returns: 8.653px
+// Increment Down GR with negative value
+// 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
View
11 readme.md
@@ -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...
- # Can be used with ceil(round up) or floor(round down).
div {
- Increment Up Golden Ratio
+ Increment Up GR with positive value
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
+
+ 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)
Please sign in to comment.
Something went wrong with that request. Please try again.