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 +1 -1
- data/stylesheets/_respond-to.scss +21 -17
- metadata +3 -3
data/lib/respond-to.rb
CHANGED
@@ -6,31 +6,35 @@
|
|
6
6
|
////////////////////////
|
7
7
|
// Default the Breakpoints variable
|
8
8
|
////////////////////////
|
9
|
-
$breakpoints:
|
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
|
-
@
|
16
|
-
@
|
17
|
-
$
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
@
|
23
|
-
|
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
|
-
|
26
|
-
|
27
|
-
|
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
|
-
-
|
9
|
-
version: 2.0.
|
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-
|
17
|
+
date: 2011-07-13 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|