Sha256: ccc3c8229ca767826709970d1e3006dc382b43d79157fa4cc9d27732a0fc7add

Contents?: true

Size: 1.31 KB

Versions: 2

Compression:

Stored size: 1.31 KB

Contents

// Foundation for Sites by ZURB
// foundation.zurb.com
// Licensed under MIT Open Source

////
/// @group xy-grid
////

/// Offsets a column to the right/bottom by `$n` columns.
///
/// @param {Number|List} $n - Size to offset by. You can pass in any value accepted by the `zf-cell()` mixin, such as `6`, `50%`, or `1 of 2`.
/// @param {Number|Map} $gutters [$grid-margin-gutters] Map of gutters or single value to use for responsive gutters.
/// @param {Keyword} $gutter-type [margin] The type of gutter to use. Can be `margin` or `padding`
/// @param {Number|Array|Keyword} $breakpoint [$-zf-zero-breakpoint] - Single value, breakpoint name, or list of breakpoint names to use for `$gutters`. See `-zf-breakpoint-value()`.
/// @param {Boolean} $vertical [false] Sets the direction of the offset. If set to true will apply margin-top instead.
@mixin xy-cell-offset(
 $n,
 $gutters: $grid-margin-gutters,
 $gutter-type: margin,
 $breakpoint: $-zf-zero-breakpoint,
 $vertical: false
) {
  $direction: if($vertical, 'top', $global-left);

  @include -zf-breakpoint-value($breakpoint, $gutters) {
    $gutter: rem-calc($-zf-bp-value) / 2;
    $gutter-margin: if($gutter-type == 'margin', $gutter, 0);
    $size: if($gutter-margin == 0, #{xy-cell-size($n)}, calc(#{xy-cell-size($n)} + #{$gutter-margin}));

    margin-#{$direction}: #{$size};
  }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foundation-rails-6.5.3.0 vendor/assets/scss/xy-grid/_position.scss
foundation-rails-6.5.1.0 vendor/assets/scss/xy-grid/_position.scss