singularitygs 1.0.alpha.1 → 1.0.alpha.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/singularitygs.rb CHANGED
@@ -5,6 +5,6 @@ require 'breakpoint'
5
5
  Compass::Frameworks.register("singularitygs", :path => "#{File.dirname(__FILE__)}/..")
6
6
 
7
7
  module SingularityGS
8
- VERSION = "1.0.alpha.1"
9
- DATE = "2012-11-06"
8
+ VERSION = "1.0.alpha.2"
9
+ DATE = "2012-12-02"
10
10
  end
@@ -1,3 +1,4 @@
1
1
  @import "grid-plugins/compound";
2
+ @import "grid-plugins/gridset";
2
3
  @import "grid-plugins/ratio-spiral";
3
4
  @import "grid-plugins/ratio";
@@ -24,7 +24,7 @@
24
24
  @function gutter-offset($gutter, $columns) {
25
25
 
26
26
  // if the gutter is a percent, convert it to a ratio
27
- @if unit($gutter) == percentage {
27
+ @if unit($gutter) == '%' {
28
28
  $gutter: percentage-gutter-conversion($gutter, $columns);
29
29
  }
30
30
 
@@ -35,7 +35,7 @@
35
35
  @function gutter-span($gutter, $columns) {
36
36
 
37
37
  // if the gutter is a percent, convert it to a ratio
38
- @if unit($gutter) == percentage {
38
+ @if unit($gutter) == '%' {
39
39
  $gutter: percentage-gutter-conversion($gutter, $columns);
40
40
  }
41
41
 
@@ -0,0 +1,16 @@
1
+ // import gridset directly into Singularity.
2
+
3
+ // Grid by grid import is easy, parsing mixins for breakpoints is more diffucult.
4
+ @mixin import-gridset-grid($prefix) {
5
+ $columns: gs-grid($prefix);
6
+ $gutter: gs-gutter($prefix);
7
+ }
8
+
9
+
10
+ // Need a variable with a list of prefixes and functions.
11
+ // Also need funcitons that list breakpoints to parse.
12
+ @mixin import-gridset() {
13
+ // @for each $grid in $gs-prefixes {
14
+ // placeholder
15
+ // }
16
+ }
@@ -0,0 +1 @@
1
+ $alphabet: a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z;
@@ -1,6 +1,4 @@
1
1
  @mixin grid-build($span, $location, $columns, $gutter, $padding, $output) {
2
-
3
-
4
2
  @include grid-structure($output, $span, $location, $columns, $gutter, $padding);
5
3
 
6
4
  // bump up the counter
@@ -2,11 +2,33 @@
2
2
 
3
3
  // This step folds in multiple grids and figures out what should
4
4
  // be loaded and figures out what breakpoint you are at.
5
- @mixin grid-span($span, $location, $columns: false, $gutter-span: false, $padding-span: false, $output: $output) {
5
+ @mixin grid-span($span, $location: false, $columns: false, $gutter-span: false, $padding-span: false, $output: $output) {
6
+
7
+ $error: false;
8
+
9
+ @if $output != 'float' and $location == false {
10
+ @warn 'Location is required for #{$output} based grids';
11
+ $error: true;
12
+ }
13
+ @else {
14
+ $columns: find-grid($columns);
15
+
16
+ @if $location == 'last' {
17
+ $location: $columns - $span + 1;
18
+ }
19
+ @else if type-of($columns) != 'number' and $location == false {
20
+ @warn 'Location is required for asymmetric grids!';
21
+ $error: true;
22
+ }
23
+ @else if type-of($columns) == 'number' and $output == 'float' {
24
+ $location: 1;
25
+ }
26
+ }
27
+
28
+ @if $error == false {
29
+ $gutter-span: find-gutter($gutter-span);
30
+ $padding-span: find-padding($padding-span, $span, $location, $columns);
6
31
 
7
- $columns: find-grid($columns);
8
- $gutter-span: find-gutter($gutter-span);
9
- $padding-span: find-padding($padding-span, $span, $location, $columns);
10
-
11
- @include grid-build($span, $location, $columns, $gutter-span, $padding-span, $output);
32
+ @include grid-build($span, $location, $columns, $gutter-span, $padding-span, $output);
33
+ }
12
34
  }
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 1
7
7
  - 0
8
8
  - alpha
9
- - 1
10
- version: 1.0.alpha.1
9
+ - 2
10
+ version: 1.0.alpha.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Scott Kellum
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-11-06 00:00:00 -05:00
19
+ date: 2012-12-02 00:00:00 -05:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -98,6 +98,7 @@ files:
98
98
  - stylesheets/singularitygs/_helpers.scss
99
99
  - stylesheets/singularitygs/_mixins.scss
100
100
  - stylesheets/singularitygs/grid-plugins/_compound.scss
101
+ - stylesheets/singularitygs/grid-plugins/_gridset.scss
101
102
  - stylesheets/singularitygs/grid-plugins/_ratio-spiral.scss
102
103
  - stylesheets/singularitygs/grid-plugins/_ratio.scss
103
104
  - stylesheets/singularitygs/grid-structure/_display-table.scss
@@ -105,6 +106,7 @@ files:
105
106
  - stylesheets/singularitygs/grid-structure/_float.scss
106
107
  - stylesheets/singularitygs/grid-structure/_grid-layout.scss
107
108
  - stylesheets/singularitygs/grid-structure/_isolation.scss
109
+ - stylesheets/singularitygs/helpers/_alphabet.scss
108
110
  - stylesheets/singularitygs/helpers/_grids.scss
109
111
  - stylesheets/singularitygs/helpers/_gridsets.scss
110
112
  - stylesheets/singularitygs/helpers/_lists.scss