responder 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -34,19 +34,22 @@ Include the `responder-breakpoints()` mixin in your stylesheet and pass your lis
34
34
 
35
35
  **Important:** Start with the smallest breakpoint and grow your list from there up to the bigger one.
36
36
 
37
- #### Ems by default
37
+ #### Settings
38
38
 
39
- Responder will do the math for you and convert your breakpoint values into ems. By default Responder uses the Compass $base-font-size configurable variable as the context.
39
+ Responder will do the math for you and convert your breakpoint values into ems. By default Responder uses the Compass `$base-font-size` configurable variable as the context and sets the media type as `screen`.
40
40
 
41
- **Need to change the context?**
41
+ **Set your own context**
42
42
 
43
- $responder-ems-context: $my-own-context;
43
+ $responder-ems-context: $my-own-context; // Defaults to $base-font-size
44
44
 
45
- **I prefer pixel breakpoints!** Easy:
45
+ **Prefer pixel breakpoints?** Easy:
46
46
 
47
- $responder-use-ems: false;
47
+ $responder-use-ems: false; // Defaults to true
48
48
 
49
+ **Change the default media type **
49
50
 
51
+ $responder-media-type: screen; // Defaults to screen
52
+
50
53
  ### 2. Using the respond-to mixin
51
54
 
52
55
  Yep, that was it. Your mixin is ready to use.
@@ -1,3 +1,3 @@
1
1
  module Responder
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -33,17 +33,17 @@
33
33
  }
34
34
 
35
35
  // If it's a breakpoint group
36
- }@else {
36
+ } @else {
37
37
  $min-width: nth( nth($breakpoint-groups, $breakpoint-group-id), 2);
38
38
  $max-width: nth( nth($breakpoint-groups, $breakpoint-group-id), 3);
39
39
  }
40
40
 
41
41
  @if $breakpoint-extend == only {
42
- @media (min-width: getSize($min-width)) and (max-width: getSize($max-width - 1)) { @content; }
42
+ @media #{$responder-media-type} and (min-width: getSize($min-width)) and (max-width: getSize($max-width - 1)) { @content; }
43
43
  } @else if $breakpoint-extend == and-up {
44
- @media (min-width: getSize($min-width)) { @content; }
44
+ @media #{$responder-media-type} and (min-width: getSize($min-width)) { @content; }
45
45
  } @else if $breakpoint-extend == and-below {
46
- @media (max-width: getSize($max-width - 1)) { @content; }
46
+ @media #{$responder-media-type} and (max-width: getSize($max-width - 1)) { @content; }
47
47
  }
48
48
  }
49
49
  }
data/scss/responder.scss CHANGED
@@ -30,6 +30,7 @@ $breakpoint-groups: ();
30
30
 
31
31
  $responder-use-ems: true !default;
32
32
  $responder-ems-context: $base-font-size !default;
33
+ $responder-media-type: screen !default;
33
34
 
34
35
  // =============================================================================
35
36
  // 2. Initialization
data/test/css/style.css CHANGED
@@ -2,7 +2,7 @@
2
2
  body {
3
3
  font: 16px/21px "Helvetica Neue", Arial, sans-serif;
4
4
  }
5
- @media (min-width: 20em) and (max-width: 37.4375em) {
5
+ @media print and (min-width: 20em) and (max-width: 37.4375em) {
6
6
  /* line 17, ../scss/style.scss */
7
7
  body {
8
8
  font-size: 95%;
@@ -34,7 +34,7 @@ tr > td:first-child {
34
34
  .mq-mixins-test tbody .response-example .isResponding {
35
35
  display: none;
36
36
  }
37
- @media (min-width: 20em) and (max-width: 37.4375em) {
37
+ @media print and (min-width: 20em) and (max-width: 37.4375em) {
38
38
  /* line 60, ../scss/style.scss */
39
39
  .mq-mixins-test tbody .respond-to-mobile {
40
40
  background: #a7e040;
@@ -49,7 +49,7 @@ tr > td:first-child {
49
49
  display: none;
50
50
  }
51
51
  }
52
- @media (min-width: 20em) and (max-width: 29.9375em) {
52
+ @media print and (min-width: 20em) and (max-width: 29.9375em) {
53
53
  /* line 65, ../scss/style.scss */
54
54
  .mq-mixins-test tbody .respond-to-mobile-portrait {
55
55
  background: #a7e040;
@@ -64,7 +64,7 @@ tr > td:first-child {
64
64
  display: none;
65
65
  }
66
66
  }
67
- @media (min-width: 30em) and (max-width: 37.4375em) {
67
+ @media print and (min-width: 30em) and (max-width: 37.4375em) {
68
68
  /* line 70, ../scss/style.scss */
69
69
  .mq-mixins-test tbody .respond-to-mobile-landscape {
70
70
  background: #a7e040;
@@ -79,7 +79,7 @@ tr > td:first-child {
79
79
  display: none;
80
80
  }
81
81
  }
82
- @media (min-width: 37.5em) and (max-width: 61.9375em) {
82
+ @media print and (min-width: 37.5em) and (max-width: 61.9375em) {
83
83
  /* line 76, ../scss/style.scss */
84
84
  .mq-mixins-test tbody .respond-to-tablet {
85
85
  background: #a7e040;
@@ -94,7 +94,7 @@ tr > td:first-child {
94
94
  display: none;
95
95
  }
96
96
  }
97
- @media (min-width: 37.5em) and (max-width: 47.9375em) {
97
+ @media print and (min-width: 37.5em) and (max-width: 47.9375em) {
98
98
  /* line 82, ../scss/style.scss */
99
99
  .mq-mixins-test tbody .respond-to-tablet-portrait {
100
100
  background: #a7e040;
@@ -109,7 +109,7 @@ tr > td:first-child {
109
109
  display: none;
110
110
  }
111
111
  }
112
- @media (min-width: 48em) and (max-width: 61.9375em) {
112
+ @media print and (min-width: 48em) and (max-width: 61.9375em) {
113
113
  /* line 88, ../scss/style.scss */
114
114
  .mq-mixins-test tbody .respond-to-tablet-landscape {
115
115
  background: #a7e040;
@@ -124,7 +124,7 @@ tr > td:first-child {
124
124
  display: none;
125
125
  }
126
126
  }
127
- @media (min-width: 62em) {
127
+ @media print and (min-width: 62em) {
128
128
  /* line 94, ../scss/style.scss */
129
129
  .mq-mixins-test tbody .respond-to-desktop {
130
130
  background: #a7e040;
@@ -139,7 +139,7 @@ tr > td:first-child {
139
139
  display: none;
140
140
  }
141
141
  }
142
- @media (min-width: 20em) {
142
+ @media print and (min-width: 20em) {
143
143
  /* line 103, ../scss/style.scss */
144
144
  .mq-mixins-test tbody .respond-to-mobile-and-up {
145
145
  background: #a7e040;
@@ -154,7 +154,7 @@ tr > td:first-child {
154
154
  display: none;
155
155
  }
156
156
  }
157
- @media (min-width: 20em) {
157
+ @media print and (min-width: 20em) {
158
158
  /* line 108, ../scss/style.scss */
159
159
  .mq-mixins-test tbody .respond-to-mobile-portrait-and-up {
160
160
  background: #a7e040;
@@ -169,7 +169,7 @@ tr > td:first-child {
169
169
  display: none;
170
170
  }
171
171
  }
172
- @media (min-width: 30em) {
172
+ @media print and (min-width: 30em) {
173
173
  /* line 113, ../scss/style.scss */
174
174
  .mq-mixins-test tbody .respond-to-mobile-landscape-and-up {
175
175
  background: #a7e040;
@@ -184,7 +184,7 @@ tr > td:first-child {
184
184
  display: none;
185
185
  }
186
186
  }
187
- @media (min-width: 37.5em) {
187
+ @media print and (min-width: 37.5em) {
188
188
  /* line 119, ../scss/style.scss */
189
189
  .mq-mixins-test tbody .respond-to-tablet-and-up {
190
190
  background: #a7e040;
@@ -199,7 +199,7 @@ tr > td:first-child {
199
199
  display: none;
200
200
  }
201
201
  }
202
- @media (min-width: 37.5em) {
202
+ @media print and (min-width: 37.5em) {
203
203
  /* line 125, ../scss/style.scss */
204
204
  .mq-mixins-test tbody .respond-to-tablet-portrait-and-up {
205
205
  background: #a7e040;
@@ -214,7 +214,7 @@ tr > td:first-child {
214
214
  display: none;
215
215
  }
216
216
  }
217
- @media (min-width: 48em) {
217
+ @media print and (min-width: 48em) {
218
218
  /* line 131, ../scss/style.scss */
219
219
  .mq-mixins-test tbody .respond-to-tablet-landscape-and-up {
220
220
  background: #a7e040;
@@ -229,7 +229,7 @@ tr > td:first-child {
229
229
  display: none;
230
230
  }
231
231
  }
232
- @media (min-width: 62em) {
232
+ @media print and (min-width: 62em) {
233
233
  /* line 137, ../scss/style.scss */
234
234
  .mq-mixins-test tbody .respond-to-desktop-and-up {
235
235
  background: #a7e040;
@@ -244,7 +244,7 @@ tr > td:first-child {
244
244
  display: none;
245
245
  }
246
246
  }
247
- @media (max-width: 37.4375em) {
247
+ @media print and (max-width: 37.4375em) {
248
248
  /* line 146, ../scss/style.scss */
249
249
  .mq-mixins-test tbody .respond-to-mobile-and-below {
250
250
  background: #a7e040;
@@ -259,7 +259,7 @@ tr > td:first-child {
259
259
  display: none;
260
260
  }
261
261
  }
262
- @media (max-width: 29.9375em) {
262
+ @media print and (max-width: 29.9375em) {
263
263
  /* line 151, ../scss/style.scss */
264
264
  .mq-mixins-test tbody .respond-to-mobile-portrait-and-below {
265
265
  background: #a7e040;
@@ -274,7 +274,7 @@ tr > td:first-child {
274
274
  display: none;
275
275
  }
276
276
  }
277
- @media (max-width: 37.4375em) {
277
+ @media print and (max-width: 37.4375em) {
278
278
  /* line 156, ../scss/style.scss */
279
279
  .mq-mixins-test tbody .respond-to-mobile-landscape-and-below {
280
280
  background: #a7e040;
@@ -289,7 +289,7 @@ tr > td:first-child {
289
289
  display: none;
290
290
  }
291
291
  }
292
- @media (max-width: 61.9375em) {
292
+ @media print and (max-width: 61.9375em) {
293
293
  /* line 162, ../scss/style.scss */
294
294
  .mq-mixins-test tbody .respond-to-tablet-and-below {
295
295
  background: #a7e040;
@@ -304,7 +304,7 @@ tr > td:first-child {
304
304
  display: none;
305
305
  }
306
306
  }
307
- @media (max-width: 47.9375em) {
307
+ @media print and (max-width: 47.9375em) {
308
308
  /* line 168, ../scss/style.scss */
309
309
  .mq-mixins-test tbody .respond-to-tablet-portrait-and-below {
310
310
  background: #a7e040;
@@ -319,7 +319,7 @@ tr > td:first-child {
319
319
  display: none;
320
320
  }
321
321
  }
322
- @media (max-width: 61.9375em) {
322
+ @media print and (max-width: 61.9375em) {
323
323
  /* line 174, ../scss/style.scss */
324
324
  .mq-mixins-test tbody .respond-to-tablet-landscape-and-below {
325
325
  background: #a7e040;
@@ -334,7 +334,7 @@ tr > td:first-child {
334
334
  display: none;
335
335
  }
336
336
  }
337
- @media (max-width: 61.9375em) {
337
+ @media print and (max-width: 61.9375em) {
338
338
  /* line 180, ../scss/style.scss */
339
339
  .mq-mixins-test tbody .respond-to-desktop-and-below {
340
340
  background: #a7e040;
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: responder
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel Guillan
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-10-15 00:00:00 Z
18
+ date: 2012-10-16 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: sass