@import '../../../node_modules/susy/sass/susy'; @import '../../../node_modules/susy/sass/plugins/svg-grid'; // Grid configs $grid-12col: ( 'columns': susy-repeat(12), 'gutters': 0.243902439, 'spread': 'narrow', 'container-spread': 'narrow', ); $grid-8col: ( 'columns': susy-repeat(8), 'gutters': 0.1941747573, 'spread': 'narrow', 'container-spread': 'narrow', ); $grid-4col: ( 'columns': susy-repeat(4), 'gutters': 0.2666666667, 'spread': 'narrow', 'container-spread': 'narrow', ); $susy: $grid-12col; // Default config for Susy // The site gutters are on the left and right of the viewport $gutter-site-12col: 2.96875vw; // 38px @ 1280px viewport $gutter-site-8col: 2.9296875vw; // 30px @ 1024px viewport $gutter-site-4col: 5vw; // 16px @ 320px viewport $site-gutters: ( default: $gutter-site-12col, '<=tabletLandscape': $gutter-site-8col, 'tabletLandscape') { @content; } } } // Apply left and right padding to an element that matches the site gutter configs. // // NOTE: This also applies a transition to all properties. // // @param {string} $side Either left, right, or both @mixin site-gutters($side: both) { @each $breakpoint, $gutter in $site-gutters { @if $breakpoint == default { // Default Styles @if $side == both or $side == right { padding-right: $gutter; } @if $side == both or $side == left { padding-left: $gutter; } transition: all 0.3s ease-in-out; } @else { // Media Queries @include media($breakpoint) { @if $side == both or $side == right { padding-right: $gutter; } @if $side == both or $side == left { padding-left: $gutter; } } } } } // Pull an element outside the site gutters to make it full bleed to the viewport. // This uses negative left and right margins. // // NOTE: This also applies a transition to all properties. // // @param {string} $side Either left, right, or both @mixin full-bleed($side: both) { @each $breakpoint, $gutter in $site-gutters { @if $breakpoint == default { // Default Styles @if $side == both or $side == right { margin-right: 0 - $gutter; } @if $side == both or $side == left { margin-left: 0 - $gutter; } transition: all 0.3s ease-in-out; } @else { // Media Queries @include media($breakpoint) { @if $side == both or $side == right { margin-right: 0 - $gutter; } @if $side == both or $side == left { margin-left: 0 - $gutter; } } } } }