gridstrap 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 62034cb22f4286cdbdf40321fafb4ad088797e85
4
- data.tar.gz: 86468136d7e49322ce32507a73fcb5c932c702cd
3
+ metadata.gz: 8e91f01904e78ba7d604c68ce78c5b5fe313971a
4
+ data.tar.gz: d9a8a6c7c4c4ed8a72620ec7e0618641e259664a
5
5
  SHA512:
6
- metadata.gz: c6fe68a1033a4dff1adafd43697982bdc503d724293727b694c9e22b3b7cd454ba20ae112991f37185b4cbd1b2e767aa61b9f6b99127345571ff767197b4c304
7
- data.tar.gz: 9263e0eed58ad7cda13a4bb8506c50b49aaa8a67e539c100b5ab2cbed59d36331cdfc14dd6f5773a51d78fe3284f18cba30c3ea17a7267e11d4dc16b6b8d53a1
6
+ metadata.gz: 2b1be6092fc009dbb6455c482c012c4863be206ed1fb38f7dda57a8e41dd2052965e5d1f63ceadb91a1a22c46a981da2aa7ac9b4faebc0043808cdf0b4914d71
7
+ data.tar.gz: fb443fc3f99c5c0bbed5d078b92224dac6dd0b2ae838de0dffe0045c7b7517a5126575fe3e50c5bf16d38cac23b933c8ad55c661df933df826ab3df0d374221b
@@ -6,6 +6,7 @@
6
6
  // "of": centered column of 1/X the container width
7
7
  // "offset": offset column by X columns (with margin)
8
8
  // "move": move column by X columns (via left/right)
9
+ // "rtl": use LTR/RTL to dictate left/right direction
9
10
  //
10
11
  // @param string $uses... The list of modifiers to use.
11
12
 
@@ -16,6 +17,7 @@
16
17
  $gridstrap-use-offset: false;
17
18
  $gridstrap-use-push: false;
18
19
  $gridstrap-use-pull: false;
20
+ $gridstrap-use-rtl: false;
19
21
 
20
22
  // If first $use isn"t "all"...
21
23
  @if nth($uses, 1) != "all" {
@@ -30,6 +32,8 @@
30
32
  } @else if $use == "move" {
31
33
  $gridstrap-use-push: true;
32
34
  $gridstrap-use-pull: true;
35
+ } @else if $use == "rtl" {
36
+ $gridstrap-use-rtl: true;
33
37
  }
34
38
  }
35
39
  } @else {
@@ -39,6 +43,7 @@
39
43
  $gridstrap-use-offset: true;
40
44
  $gridstrap-use-push: true;
41
45
  $gridstrap-use-pull: true;
46
+ $gridstrap-use-rtl: true;
42
47
  }
43
48
  }
44
49
 
@@ -57,9 +62,20 @@
57
62
 
58
63
  %gridstrap-col {
59
64
  @extend %gridstrap-padding;
60
- float: left;
61
65
  position: relative;
62
66
  min-height: 1px;
67
+
68
+ @if $gridstrap-use-rtl {
69
+ .ltr &{
70
+ float: left;
71
+ }
72
+ .rtl &{
73
+ float: right;
74
+ }
75
+ }
76
+ @else {
77
+ float: left;
78
+ }
63
79
  }
64
80
 
65
81
  %gridstrap-span {
@@ -149,17 +165,48 @@
149
165
  @if $i < $gridstrap-cols {
150
166
  @if $gridstrap-use-offset {
151
167
  .offset-#{$midfix}#{$i} {
152
- margin-left: $width;
168
+ @if $gridstrap-use-rtl {
169
+ .ltr &{
170
+ margin-left: $width;
171
+ }
172
+ .rtl &{
173
+ margin-right: $width;
174
+ }
175
+ }
176
+ @else {
177
+ margin-left: $width;
178
+ }
153
179
  }
154
180
  }
155
181
  @if $gridstrap-use-push {
156
182
  .push-#{$midfix}#{$i} {
157
- left: $width;
183
+ @if $gridstrap-use-rtl {
184
+ .ltr &{
185
+ left: $width;
186
+ }
187
+ .rtl &{
188
+ right: $width;
189
+ }
190
+ }
191
+ @else {
192
+ left: $width;
193
+ }
158
194
  }
159
195
  }
160
196
  @if $gridstrap-use-pull {
161
197
  .pull-#{$midfix}#{$i} {
162
198
  right: $width;
199
+ @if $gridstrap-use-rtl {
200
+ .ltr &{
201
+ right: $width;
202
+ }
203
+ .rtl &{
204
+ left: $width;
205
+ }
206
+ }
207
+ @else {
208
+ right: $width;
209
+ }
163
210
  }
164
211
  }
165
212
  }
@@ -168,17 +215,47 @@
168
215
  // Add resets
169
216
  @if $gridstrap-use-offset {
170
217
  .offset-#{$midfix}0 {
171
- margin-left: 0;
218
+ @if $gridstrap-use-rtl {
219
+ .ltr &{
220
+ margin-left: 0;
221
+ }
222
+ .rtl &{
223
+ margin-right: 0;
224
+ }
225
+ }
226
+ @else {
227
+ margin-left: 0;
228
+ }
172
229
  }
173
230
  }
174
231
  @if $gridstrap-use-push {
175
232
  .push-#{$midfix}0 {
176
- margin-left: 0;
233
+ @if $gridstrap-use-rtl {
234
+ .ltr &{
235
+ left: 0;
236
+ }
237
+ .rtl &{
238
+ right: 0;
239
+ }
240
+ }
241
+ @else {
242
+ left: 0;
243
+ }
177
244
  }
178
245
  }
179
246
  @if $gridstrap-use-pull {
180
247
  .pull-#{$midfix}0 {
181
- margin-left: 0;
248
+ @if $gridstrap-use-rtl {
249
+ .ltr &{
250
+ right: 0;
251
+ }
252
+ .rtl &{
253
+ left: 0;
254
+ }
255
+ }
256
+ @else {
257
+ right: 0;
258
+ }
182
259
  }
183
260
  }
184
261
  }
@@ -7,4 +7,5 @@ $gridstrap-use-span: true !default;
7
7
  $gridstrap-use-of: true !default;
8
8
  $gridstrap-use-offset: true !default;
9
9
  $gridstrap-use-push: true !default;
10
- $gridstrap-use-pull: true !default;
10
+ $gridstrap-use-pull: true !default;
11
+ $gridstrap-use-rtl: false !default;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gridstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doug Wollison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2012-01-29 00:00:00.000000000 Z
11
+ date: 2014-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: compass