css_grid 2.7.6 → 2.7.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +9 -0
- data/lib/css_grid/version.rb +1 -1
- data/lib/css_grid.rb +4 -2
- metadata +1 -1
data/README.md
CHANGED
@@ -33,6 +33,15 @@ app/assets/stylesheets/application.css
|
|
33
33
|
*/
|
34
34
|
```
|
35
35
|
|
36
|
+
#### Rails <= 3.0
|
37
|
+
|
38
|
+
Add the following lines to your rakefile then run 'rake css:grid:setup' to copy 'grid.scss' to public/stylesheets
|
39
|
+
```
|
40
|
+
require 'css_grid'
|
41
|
+
require 'css_grid/tasks'
|
42
|
+
```
|
43
|
+
|
44
|
+
|
36
45
|
### Grid Helpers
|
37
46
|
|
38
47
|
To use the methods helper provide, you need to include GridHelper
|
data/lib/css_grid/version.rb
CHANGED
data/lib/css_grid.rb
CHANGED
@@ -21,7 +21,8 @@ module GridHelper
|
|
21
21
|
value.class == Proc ? value.call(@elt) : value
|
22
22
|
end
|
23
23
|
|
24
|
-
prepend =
|
24
|
+
prepend = options.delete :prepend
|
25
|
+
prepend = if prepend.present? and TWELVE_STRING_INTS_INVERT.has_key? prepend.abs
|
25
26
|
if prepend > 0
|
26
27
|
"#{ GRID_CONFIG[:classes][:prepend] }_#{ TWELVE_STRING_INTS_INVERT[prepend] }"
|
27
28
|
else
|
@@ -31,7 +32,8 @@ module GridHelper
|
|
31
32
|
warn "WARNING : invalid value for ':prepend'"
|
32
33
|
end
|
33
34
|
|
34
|
-
append =
|
35
|
+
append = options.delete :append
|
36
|
+
append = if append and TWELVE_STRING_INTS_INVERT.has_key? append
|
35
37
|
"#{ GRID_CONFIG[:classes][:append] }_#{ TWELVE_STRING_INTS_INVERT[options.delete :append] }"
|
36
38
|
elsif append
|
37
39
|
warn "WARNING : invalid value for ':append'"
|