Created
January 24, 2012 05:55
-
-
Save alexeckermann/1668265 to your computer and use it in GitHub Desktop.
Golden CSS3-POINT-OH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$golden-ratio: 1.61803399; // Everyone's doing it! | |
@function golden-division($value, $times: 1) { | |
@for $i from 1 through $times { | |
$value: $value / $golden-ratio; | |
} | |
@return round($value); | |
} | |
@function golden-multiple($value, $times: 1) { | |
@for $i from 1 through $times { | |
$value: $value * $golden-ratio; | |
} | |
@return round($value); | |
} | |
// --- | |
.derp { | |
width: golden-division($content-width, 2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment