Last active
December 30, 2019 20:46
-
-
Save RussellBishop/f5b14ab213c6ecb35cc6ba9b3ec3071a to your computer and use it in GitHub Desktop.
Container Units CSS - SCSS Functions
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
@function columns($i) { | |
@return calc(#{$i} * var(--column-unit)); | |
} | |
@function gutters($i) { | |
@return calc(#{$i} * var(--gutter-unit)); | |
} | |
@function column-spans($i) { | |
@return calc(#{$i} * var(--column-and-gutter-unit) - var(--gutter-unit)); | |
} | |
@function gutter-spans($i) { | |
@return calc(#{$i} * var(--column-and-gutter-unit) - var(--column-unit)); | |
} | |
@function mix-units($columns, $gutters: $columns) { | |
@return calc((#{$columns} * var(--column-unit)) + (#{$gutters} * var(--gutter-unit))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment