respond-to 2.3 → 2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/stylesheets/_respond-to.scss +10 -1
  2. metadata +2 -2
@@ -11,8 +11,17 @@ $breakpoints: () !default;
11
11
  ////////////////////////
12
12
  // Respond-to API Mixin
13
13
  ////////////////////////
14
+
14
15
  @mixin respond-to($context, $media: $breakpoint-default-media, $no-query: false) {
16
+ @if type-of($breakpoints) != 'list' {
17
+ // Just in case someone writes gibberish to the $breakpoints variable.
18
+ @warn "Your breakpoints aren't a list! See https://github.com/snugug/respond-to#api if you'd like a reminder on how to use Respond-to";
19
+ }
15
20
  @if length($breakpoints) != 0 {
21
+ // If there's only one breakpoint, SASS will think it's a space separated list :P
22
+ @if length($breakpoints) == 2 and type-of(nth($breakpoints, 1)) != 'list' {
23
+ $breakpoints: append((), (nth($breakpoints, 1), nth($breakpoints, 2)));
24
+ }
16
25
  @each $bkpt in $breakpoints {
17
26
  @if $context == nth($bkpt, 1) {
18
27
  $length: length($bkpt);
@@ -39,4 +48,4 @@ $breakpoints: () !default;
39
48
  @warn "You haven't created any breakpoints yet! Make some already! See https://github.com/snugug/respond-to#api if you'd like a reminder on how to use Respond-to";
40
49
  @content;
41
50
  }
42
- }
51
+ }
metadata CHANGED
@@ -4,8 +4,8 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 2
7
- - 3
8
- version: "2.3"
7
+ - 4
8
+ version: "2.4"
9
9
  platform: ruby
10
10
  authors:
11
11
  - Sam Richard