Forked from macbleser/foundation-grid-columns-mixin
Last active
September 17, 2020 14:37
-
-
Save webdevian/354096545435c6ed4c00 to your computer and use it in GitHub Desktop.
Mixin to set both grid columns and offsets
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
// For setting both columns and offset in the same mixin | |
@mixin grid-offsets( | |
// Mobile First Media Queries | |
$small-up-columns: false, | |
$small-up-offset: 0, | |
$medium-up-columns: false, | |
$medium-up-offset: 0, | |
$large-up-columns: false, | |
$large-up-offset: 0, | |
$xlarge-up-columns: false, | |
$xlarge-up-offset: 0 | |
){ | |
// | |
// Mobile First Media Queries | |
// | |
// Small and up screens | |
@if $small-up-columns { | |
@include grid-column($columns:$small-up-columns,$offset:$small-up-offset); | |
} | |
// Medium and up screens | |
@if $medium-up-columns { | |
@media #{$medium-up} { | |
@include grid-column($columns:$medium-up-columns,$offset:$medium-up-offset); | |
} | |
} | |
// Large and up screens | |
@if $large-up-columns { | |
@media #{$large-up} { | |
@include grid-column($columns:$large-up-columns,$offset:$large-up-offset); | |
} | |
} | |
// XLarge and up screens | |
@if $xlarge-up-columns { | |
@media #{$xlarge-up} { | |
@include grid-column($columns:$xlarge-up-columns,$offset:$xlarge-up-offset); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment