Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Container Units CSS - SCSS Functions
@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
You can’t perform that action at this time.