Created
March 3, 2017 23:16
-
-
Save chrsgrffth/d1d49b61f4d05e20aed69b702f9494dd to your computer and use it in GitHub Desktop.
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
// ---------------------------------------------------------------------------- | |
// Map Functions | |
// ---------------------------------------------------------------------------- | |
@function to-string($int) | |
@return inspect($int) | |
// Still trying to think through if functions would be better than variables. | |
// * Benefit of variables is autocomplete. | |
// * Benefits of functions is clearer logic and simplicity in mapping. | |
// ** Thinking `--` prefixed would identify functions provided by core to be | |
// used in component sass files. | |
// Returns mapped spacing value in rems. | |
// @param $key {Number or String} '05' | |
// @return {0.5rem} | |
@function $rem-value | |
@return map-get($spacing, to-string($key)) * 1rem | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment