compass-respond 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  sass-respond
2
2
  ===============
3
3
 
4
- There are two parts to this...
4
+ There are three parts to this...
5
5
 
6
6
  + +respond-to($device)
7
-
8
7
  + +respond-above($screen-size)
8
+ + +respond-below($screen-size)
9
9
 
10
- +respond-to example
11
- -------------------
10
+ +respond-to
11
+ -----------
12
12
 
13
13
  Options:
14
14
 
@@ -50,8 +50,8 @@ CSS:
50
50
  @media only screen and (min-width: 768px) and (max-width: 959px) { .content { width: 80%; } }
51
51
  @media only screen and (min-width: 960px) { .content { width: 70%; max-width: 1150px; } }
52
52
 
53
- +respond-above example
54
- ----------------------
53
+ +respond-above
54
+ --------------
55
55
 
56
56
  Options:
57
57
 
@@ -86,9 +86,44 @@ CSS:
86
86
  @media only screen and (min-width: 992px) { .charts { column-count: 5; } }
87
87
  @media only screen and (min-width: 1382px) { .charts { column-count: 6; } }
88
88
 
89
+ +respond-below
90
+ --------------
91
+
92
+ Options:
93
+
94
+ * xs
95
+ * s
96
+ * m
97
+ * l
98
+ * xl
99
+
100
+ SASS:
101
+
102
+ @import "respond-below"
103
+ .charts
104
+ column-count: 6
105
+ +respond-below(xl)
106
+ column-count: 5
107
+ +respond-below(l)
108
+ column-count: 4
109
+ +respond-below(m)
110
+ column-count: 3
111
+ +respond-below(s)
112
+ column-count: 2
113
+ +respond-below(xs)
114
+ column-count: 1
115
+
116
+ CSS:
89
117
 
118
+ .charts { column-count: 6; }
119
+ @media only screen and (max-width: 1382px) { .charts { column-count: 5; } }
120
+ @media only screen and (min-width: 992px) { .charts { column-count: 4; } }
121
+ @media only screen and (min-width: 768px) { .charts { column-count: 3; } }
122
+ @media only screen and (min-width: 600px) { .charts { column-count: 2; } }
123
+ @media only screen and (min-width: 480px) { .charts { column-count: 1; } }
124
+
90
125
  Usage
91
- ------
126
+ -----
92
127
 
93
128
  First add compass-respond to your Gemfile:
94
129
 
@@ -102,6 +137,13 @@ Then you can import the mixin you want into your .sass file:
102
137
 
103
138
  @import "respond-to"
104
139
  @import "respond-above"
140
+ @import "respond-below"
141
+
142
+ Contributors
143
+ ------------
144
+
145
+ @mikesten
146
+ @mavilein
105
147
 
106
148
  Credit
107
149
  ------
@@ -110,6 +152,8 @@ respond-to() is a convenience plugin for [Chris Eppstein's Gist](https://gist.gi
110
152
 
111
153
  respond-above() is a simple mixin based on Malarkey's [320andup](https://github.com/malarkey/320andup/) responsive steps.
112
154
 
155
+ respond-below() is the work of [mavilein](https://github.com/mavilein).
156
+
113
157
  I'm fully expecting Compass to add something like this in the near future.
114
158
 
115
159
  Many thanks to Brandon Mathis and his [Fancy Buttons](https://github.com/imathis/fancy-buttons), which I used as a template for this gem.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  :major: 0
3
- :minor: 0
4
- :patch: 4
3
+ :minor: 1
4
+ :patch: 0
5
5
  :state:
6
6
  :build:
@@ -0,0 +1,22 @@
1
+ $respond-below-xs: 480px !default
2
+ $respond-below-s: 600px !default
3
+ $respond-below-m: 768px !default
4
+ $respond-below-l: 992px !default
5
+ $respond-below-xl: 1382px !default
6
+
7
+ =respond-below($screen-size)
8
+ @if $screen-size == xs
9
+ @media only screen and (max-width: $respond-below-xs)
10
+ @content
11
+ @else if $screen-size == s
12
+ @media only screen and (max-width: $respond-below-s)
13
+ @content
14
+ @else if $screen-size == m
15
+ @media only screen and (max-width: $respond-below-m)
16
+ @content
17
+ @else if $screen-size == l
18
+ @media only screen and (max-width: $respond-below-l)
19
+ @content
20
+ @else if $screen-size == xl
21
+ @media only screen and (max-width: $respond-below-xl)
22
+ @content
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compass-respond
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-20 00:00:00.000000000 Z
12
+ date: 2013-09-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass
@@ -54,6 +54,7 @@ files:
54
54
  - Rakefile
55
55
  - lib/compass-respond.rb
56
56
  - lib/stylesheets/_respond-above.sass
57
+ - lib/stylesheets/_respond-below.sass
57
58
  - lib/stylesheets/_respond-to.sass
58
59
  - lib/version.rb
59
60
  homepage: http://github.com/mikesten/compass-respond
@@ -76,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
77
  version: '0'
77
78
  requirements: []
78
79
  rubyforge_project:
79
- rubygems_version: 1.8.24
80
+ rubygems_version: 1.8.25
80
81
  signing_key:
81
82
  specification_version: 3
82
83
  summary: Easier media queries for Compass.