Sha256: cc8f279fa082f958a16b314e7543f0522e416ed7d8f355164700a2f401b1b8a3

Contents?: true

Size: 1.65 KB

Versions: 92

Compression:

Stored size: 1.65 KB

Contents

// ---------------------------------------------------------------------------
// Isolation

// Isolate the position of a grid element (use in addition to span-columns)
//
// $location  : The grid column to isolate in, relative to the container;
// $context   : [optional] The context (columns spanned by parent).
// $from      : The start direction of your layout (e.g. 'left' for ltr languages)
@mixin isolate(
  $location,
  $context: $total-columns,
  $from: $from-direction,
  $style: fix-static-misalignment()
) {
  $to: opposite-position($from);
  margin-#{$to}: -100%;
  margin-#{$from}: space($location - 1, $context, $style);
}

// Isolate a group of elements in a grid, using nth-child selectors
//
// $columns       : The column-width of each item on the grid;
// $context       : [optional] The context (columns spanned by parent).
// $selector      : [child | of-type | last-of-type ] (default is 'child')
// $from          : The start direction of your layout (e.g. 'left' for ltr languages)
@mixin isolate-grid(
  $columns,
  $context: $total-columns,
  $selector: 'child',
  $from: $from-direction,
  $style: fix-static-misalignment()
) {
  $to: opposite-position($from);
  $location: 1;
  $line: floor($context / $columns);

  @include span-columns($columns, $context, $from: $from, $style: $style);
  margin-#{$to}: -100%;

  @for $item from 1 through $line {
    $nth: '#{$line}n + #{$item}';
    &:#{format-nth($nth,$selector)} {
      margin-#{$from}: space($location - 1, $context, $style);
      @if $location == 1 { clear: $from; }
      @else { clear: none; }

      $location: $location + $columns;
      @if $location > $context { $location: 1; }
    }
  }
}

Version data entries

92 entries across 91 versions & 10 rubygems

Version Path
wrgem-0.0.22 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.21 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.20 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.19 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.18 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.17 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.15 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.14 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.13 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.12 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.11 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.10 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.9 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.8 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.7 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.6 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.4 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.3 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.2 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss
wrgem-0.0.1 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susyone/_isolation.scss