Skip to content
This repository has been archived by the owner on Nov 3, 2020. It is now read-only.

Add $shift parameter back in #34

Closed
ezekg opened this issue Jul 15, 2015 · 0 comments
Closed

Add $shift parameter back in #34

ezekg opened this issue Jul 15, 2015 · 0 comments

Comments

@ezekg
Copy link
Owner

ezekg commented Jul 15, 2015

Having this integration with a custom output mixin would work best, that way we don't back anybody into a corner using something they don't prefer (like negative margins over positioning). Here's a mixin I like to keep handy that shouldn't be too hard to modify:

/**
 * Shift columns
 *
 * @param {String} $breakpoint        - Breakpoint to apply shift to
 * @param {Number} $columns           - Amount to shift columns
 * @param {Bool}   $has-gutter (true) - Add gutter value to shift
 *
 * @output - Margin to shift columns
 */
@mixin shift($breakpoint, $columns, $has-gutter: true)
  $width-map: flint-calc-width($breakpoint, $columns)
  $gutter: if($has-gutter, flint-get-gutter(), 0)

  @include _($breakpoint)
    @if map-fetch($flint, "settings", "grid") == "fluid"
      margin-left: (map-get($width-map, "target") + $gutter) / map-get($width-map, "context") * 100%
    @else
      margin-left: map-get($width-map, "target") + $gutter
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant