Sha256: 386cb70e2b17d5e21f744dd1811ceac837622222cdb05afefe62bd4e41aedefb

Contents?: true

Size: 627 Bytes

Versions: 5

Compression:

Stored size: 627 Bytes

Contents

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

////
/// @group grid
////

/// Sizes child elements so that `$n` number of items appear on each row.
///
/// @param {Number} $n - Number of elements to display per row.
/// @param {String} $selector ['.column'] - Selector(s) to use for child elements.
@mixin grid-layout(
  $n,
  $selector: '.column'
) {
  & > #{$selector} {
    width: percentage(1/$n);
    float: $global-left;

    &:nth-of-type(1n) {
      clear: none;
    }

    &:nth-of-type(#{$n}n+1) {
      clear: both;
    }

    &:last-child {
      float: left;
    }
  }
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foundation-rails-6.1.2.0 vendor/assets/scss/grid/_layout.scss
foundation-rails-6.1.1.3 vendor/assets/scss/grid/_layout.scss
foundation-rails-6.1.1.2 vendor/assets/scss/grid/_layout.scss
foundation-rails-6.1.1.1 vendor/assets/scss/grid/_layout.scss
foundation-rails-6.1.1.0 vendor/assets/scss/grid/_layout.scss