respond-to 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/respond-to.rb CHANGED
@@ -2,4 +2,4 @@ require 'compass'
2
2
  require 'breakpoint'
3
3
 
4
4
  extension_path = File.expand_path(File.join(File.dirname(__FILE__), ".."))
5
- Compass::Frameworks.register('aura', :path => extension_path)
5
+ Compass::Frameworks.register('respond-to', :path => extension_path)
@@ -6,31 +6,35 @@
6
6
  ////////////////////////
7
7
  // Default the Breakpoints variable
8
8
  ////////////////////////
9
- $breakpoints: () !default;
9
+ $breakpoints: false !default;
10
10
 
11
11
  ////////////////////////
12
12
  // Respond-to API Mixin
13
13
  ////////////////////////
14
14
  @mixin respond-to($context, $media: $breakpoint-default-media) {
15
- @each $bkpt in $breakpoints {
16
- @if $context == nth($bkpt, 1) {
17
- $length: length($bkpt);
18
- $mq: false !default;
19
-
20
- @for $i from 2 through $length {
21
- // If it's the first item, override $mq
22
- @if $i == 2 {
23
- $mq: nth($bkpt, $i);
15
+ @if $breakpoints != false {
16
+ @each $bkpt in $breakpoints {
17
+ @if $context == nth($bkpt, 1) {
18
+ @debug $bkpt;
19
+ $length: length($bkpt);
20
+ $mq: false !default;
21
+
22
+ @for $i from 2 through $length {
23
+ // If it's the first item, override $mq
24
+ @if $i == 2 {
25
+ $mq: nth($bkpt, $i);
26
+ }
27
+ // Else, join $mq
28
+ @else {
29
+ $mq: join($mq, nth($bkpt, $i));
30
+ }
24
31
  }
25
- // Else, join $mq
26
- @else {
27
- $mq: join($mq, nth($bkpt, $i));
32
+ @debug $mq;
33
+
34
+ @include breakpoint($mq, $media) {
35
+ @content;
28
36
  }
29
37
  }
30
-
31
- @include breakpoint($mq, $media) {
32
- @content;
33
- }
34
38
  }
35
39
  }
36
40
  }
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 2
7
7
  - 0
8
- - 2
9
- version: 2.0.2
8
+ - 3
9
+ version: 2.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sam Richard
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-06-18 00:00:00 -04:00
17
+ date: 2011-07-13 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency