Created
July 9, 2016 21:09
-
-
Save lonekorean/940033de0deea56dbff72cf2c0a172cf to your computer and use it in GitHub Desktop.
Sass hexagon math
This file contains 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
// tweak this | |
$width: 200px; | |
// automatically computed | |
$side-length: ($width / 2) / cos(30deg); | |
$cap-y-scale: tan(30deg); | |
$cap-height: ($width / 2) * $cap-y-scale; | |
$cap-unscaled-side-length: $width / sqrt(2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment