singularitygs 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/singularitygs.rb CHANGED
@@ -4,7 +4,7 @@ Compass::Frameworks.register("singularitygs", :path => "#{File.dirname(__FILE__)
4
4
 
5
5
  module CompassExtension
6
6
 
7
- VERSION = "0.0.2"
7
+ VERSION = "0.0.3"
8
8
  DATE = "2012-06-23"
9
9
 
10
10
  end
@@ -1,10 +1,7 @@
1
1
  =test-grid($columns: $columns, $gutter: $gutter, $padding: $padding, $prefix: a, $opacity: .5)
2
2
  .test-grid
3
- position: relative
4
- height: 100%
3
+ height: 200px
5
4
  width: 100%
6
- min-height: 200px
7
- margin-bottom: -100%
8
5
  $grid-counter: 1
9
6
  @for $i from 1 through column-count($columns)
10
7
  .test.#{$prefix}#{$i}
@@ -35,18 +35,31 @@ $grid-counter: 1
35
35
  $grid-counter: 1
36
36
  @else
37
37
  margin-right: $gutter
38
- @if $padding != 0
39
- +grid-padding($padding)
40
38
 
41
39
 
42
40
  // This writes classes, IDs, or silent objects for you to extend or use in your HTML. They can be written to different breakpoints to extend or call into your HTML as needed.
43
41
  =grid-objects($prefix: a, $columns: $columns, $gutter: $gutter, $padding: $padding, $selector: "%")
44
42
  // counter keeps track of the starting position
45
43
  $count: 0
44
+ %column
45
+ float: left
46
+ +grid-padding($padding)
47
+ margin-right: $gutter
48
+
46
49
  @for $i from 1 through column-count($columns)
47
- @for $n from 1 through column-count($columns) - $count
48
- #{$selector}#{$prefix}#{$n}-#{$count + 1}
49
- +grid-span($n, $count + 1, $columns, $gutter, $padding)
50
+ @for $n from $count + 1 through column-count($columns)
51
+ #{$selector}#{$prefix}#{$count}-#{$n}
52
+ @extend %column
53
+ width: grid-span($n - $count, $count + 1, $columns, $gutter)
54
+ @if $n == column-count($columns)
55
+ margin-right: 0
56
+ // add special padding
57
+ @if type-of($columns) == list
58
+ @if type-of(nth($columns, $count + 1)) == list
59
+ padding-left: nth(nth($columns, $count + 1), 2)
60
+ // add special right padding
61
+ @if type-of(nth($columns, ($n))) == list
62
+ padding-right: nth(nth($columns, ($n)), 2)
50
63
  $count: $count + 1
51
64
 
52
65
 
@@ -55,3 +68,4 @@ $grid-counter: 1
55
68
  =grid-padding($padding)
56
69
  @if $padding != 0
57
70
  padding: 0 $padding
71
+ +box-sizing(border-box)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: singularitygs
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Scott Kellum