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.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.