Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add offset-none to the responsive offset loop #3014

Merged
merged 1 commit into from Apr 4, 2019
Merged

Conversation

thisisdano
Copy link
Member

@thisisdano thisisdano commented Apr 4, 2019

Thanks to @robertromore for bringing this up in #3013

We'd omitted offset-none from the responsive offsets loop. Since none isn't one of the keys in $system-layout-grid-widths, we have to add it to the loop manually, as we do in

.#{$namespace-grid}offset-none {

faulty loop:

// responsive offsets
@each $mq-key, $mq-value in $system-breakpoints {
  @if map-get($theme-utility-breakpoints, $mq-key) {
    @each $width-key, $width-value in $system-layout-grid-widths {
      @include at-media($mq-key) {
        .#{$mq-key}\:#{$namespace-grid}offset-#{$width-key} {
          $props: append-important($grid-global, $width-key);
          @include grid-offset($props);
        }
      }
    }
// --> need to add the offset-none rule here.
  }
}

updated loop:

// responsive offsets
@each $mq-key, $mq-value in $system-breakpoints {
  @if map-get($theme-utility-breakpoints, $mq-key) {
    @each $width-key, $width-value in $system-layout-grid-widths {
      @include at-media($mq-key) {
        .#{$mq-key}\:#{$namespace-grid}offset-#{$width-key} {
          $props: append-important($grid-global, $width-key);
          @include grid-offset($props);
        }
      }
    }
    @include at-media($mq-key) {
      .#{$mq-key}\:#{$namespace-grid}offset-none {
        $props: append-important($grid-global, none);
        @include grid-offset($props);
      }
    }
  }
}

@maya maya merged commit 6389235 into release-2.0 Apr 4, 2019
@maya maya deleted the dw-fix-offset-none branch April 4, 2019 16:55
@thisisdano thisisdano mentioned this pull request Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants