Sha256: 8653365b5c0ddb123057210f1da12a6b68d253a106375cf1c6b4e85effd72669

Contents?: true

Size: 1.91 KB

Versions: 3

Compression:

Stored size: 1.91 KB

Contents

// Mixins
// ------------------------------------------------------

// Create the grid for a given size
// This will loop over the number of columns and create a css class
// for each. If it's the last gride size, then let's not add a float
@mixin grid-core($size)
  @for $i from 1 through $grid-columns
    .col-#{$size}-#{$i}
      @include span-columns($i)

    
    // If it's not the screen-xs, then let's add push and pull helper classes
    @if $size != "xs"
      .col-#{$size}-push-#{$i}
        left: flex-grid($i, $grid-columns) + flex-gutter($grid-columns)
      .col-#{$size}-pull-#{$i}
        right: flex-grid($i, $grid-columns) + flex-gutter($grid-columns)


    // Create the collapse classes, i.e., .col-lg-collapse-2
    .col-#{$size}-collapse-#{$i}
      // @include span-columns($i, gutterless)
      @include span-columns-gutterless($i)


    // Offsetting, i.e., .col-sm-offset-2
    .col-#{$size}-offset-#{$i}
      @include shift($i)

  // Create columns centering for the given size
  .col-#{$size}-centered
    margin-left: auto !important
    margin-right: auto !important
    float: none !important


// Omega Core builder
@mixin omega-core($size)
  @for $i from 1 through $grid-columns
    .omega-#{$size}-#{$i}
      [class^="col-"],
      [class*=" col-"]
        @include omega(#{$i}n)


// Thoughtbot doesn't want to add a gutterless display type for 
// span columns so we'll use this mixin for now. This will create
// equal column widths without any margin/gutters
@mixin span-columns-gutterless($span: $columns of $container-columns) 
  $columns: nth($span, 1)
  $container-columns: container-span($span)

  $direction: get-direction($layout-direction, $default-layout-direction)
  $opposite-direction: get-opposite-direction($direction)

  display: block
  float: #{$opposite-direction}
  
  width: percentage($columns / $container-columns)
     
  &:last-child
    width: percentage($columns / $container-columns)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
stump-cli-0.1.3 lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_mixins.sass
stump-cli-0.1.2 lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_mixins.sass
stump-cli-0.1.1 lib/wp/wp-content/themes/stump/assets/vendor/manhattan/manhattan/_mixins.sass