Sha256: 40082a8878aa93ee27ac707ac3c3c06c97bfee1f9807955b69c1036297ba70ba
Contents?: true
Size: 1.57 KB
Versions: 3
Compression:
Stored size: 1.57 KB
Contents
// Sass math that will determine the width of the push, pull, prefix and suffix and write appropiate CSS // ---------------------------- // @mixin push_logic ($col_count, $grid_uom, $move, $width_gutter) { @if $grid_uom == em { $padding_width: #{($width_gutter * $col_count) / $em}em; @if $move == suffix { padding-right: $padding_width; } @else if $move == prefix { padding-left: $padding_width; } @else if $move == push { left: #{($width_gutter * $col_count) / $em}em; } @else if $move == pull { right: #{($width_gutter * $col_count) / $em}em; } } @else if $grid_uom == percent { $grid_width: ($width_gutter * $col_count) / $grid_960; $padding_width: #{($width_gutter * $col_count) / $grid_960}; @if $move == suffix { padding-right: $padding_width; } @else if $move == prefix { padding-left: $padding_width; } @else if $move == push { left: ($width_gutter * $col_count) / $grid_960; } @else if $move == pull { right: ($width_gutter * $col_count) / $grid_960; } } } // Push, Pull, Prefix, Suffix logic // Paired down reusable logic, based on $type will determine width + gutter and // send values to the push_logic mixin to determine the value of the Push, Pull, Prefix or Suffix // ------------------------------------------------------------------ // @mixin ppps ($type, $col_count, $grid_uom, $move) { @if $type == 12 { $width_gutter: 80; @include push_logic ($col_count, $grid_uom, $move, $width_gutter); } @else if $type == 16 { $width_gutter: 60; @include push_logic ($col_count, $grid_uom, $move, $width_gutter); } }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
stipe-0.0.6.1 | stylesheets/stipe/grid/lib/_push_logic.scss |
stipe-0.0.6.0 | stylesheets/stipe/grid/lib/_push_logic.scss |
stipe-0.0.5.9 | stylesheets/stipe/grid/lib/_push_logic.scss |