_shift.scss 551 B

12345678910111213141516
  1. @mixin shift($n-columns: 1) {
  2. @include shift-in-context($n-columns);
  3. }
  4. @mixin shift-in-context($shift: $columns of $container-columns) {
  5. $n-columns: nth($shift, 1);
  6. $parent-columns: container-shift($shift) !global;
  7. $direction: get-direction($layout-direction, $default-layout-direction);
  8. $opposite-direction: get-opposite-direction($direction);
  9. margin-#{$opposite-direction}: $n-columns * flex-grid(1, $parent-columns) + $n-columns * flex-gutter($parent-columns);
  10. // Reset nesting context
  11. $parent-columns: $grid-columns !global;
  12. }