singularitygs 0.0.17 → 0.1.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/lib/singularitygs.rb +2 -2
  2. data/stylesheets/singularitygs.sass +40 -0
  3. data/stylesheets/singularitygs/_background-grid.sass +19 -0
  4. data/stylesheets/singularitygs/_column.sass +25 -0
  5. data/stylesheets/singularitygs/_grid-plugins.sass +2 -0
  6. data/stylesheets/singularitygs/{_grid-test.scss → _grid-test.sass} +13 -22
  7. data/stylesheets/singularitygs/_grid.sass +2 -0
  8. data/stylesheets/singularitygs/_gridsets.scss +242 -0
  9. data/stylesheets/singularitygs/_gutter.sass +4 -0
  10. data/stylesheets/singularitygs/_helpers.sass +37 -0
  11. data/stylesheets/singularitygs/_mixins.sass +75 -0
  12. data/stylesheets/singularitygs/grid-plugins/_compound.sass +30 -0
  13. data/stylesheets/singularitygs/grid-plugins/_ratio.scss +0 -4
  14. metadata +24 -40
  15. data/stylesheets/_singularitygs.scss +0 -68
  16. data/stylesheets/singularitygs/_background-grid.scss +0 -26
  17. data/stylesheets/singularitygs/_column.scss +0 -51
  18. data/stylesheets/singularitygs/_grid-plugins.scss +0 -3
  19. data/stylesheets/singularitygs/_grid.scss +0 -3
  20. data/stylesheets/singularitygs/_gutter.scss +0 -45
  21. data/stylesheets/singularitygs/_helpers.scss +0 -3
  22. data/stylesheets/singularitygs/_mixins.scss +0 -7
  23. data/stylesheets/singularitygs/grid-plugins/_compound.scss +0 -49
  24. data/stylesheets/singularitygs/grid-plugins/_ratio-spiral.scss +0 -42
  25. data/stylesheets/singularitygs/grid-structure/_display-table.scss +0 -1
  26. data/stylesheets/singularitygs/grid-structure/_flexbox.scss +0 -0
  27. data/stylesheets/singularitygs/grid-structure/_float.scss +0 -94
  28. data/stylesheets/singularitygs/grid-structure/_grid-layout.scss +0 -1
  29. data/stylesheets/singularitygs/grid-structure/_isolation.scss +0 -145
  30. data/stylesheets/singularitygs/helpers/_grids.scss +0 -34
  31. data/stylesheets/singularitygs/helpers/_gridsets.scss +0 -362
  32. data/stylesheets/singularitygs/helpers/_lists.scss +0 -29
  33. data/stylesheets/singularitygs/mixins/_base-font-size.scss +0 -63
  34. data/stylesheets/singularitygs/mixins/_container.scss +0 -63
  35. data/stylesheets/singularitygs/mixins/_grid-build.scss +0 -16
  36. data/stylesheets/singularitygs/mixins/_grid-objects.scss +0 -26
  37. data/stylesheets/singularitygs/mixins/_grid-padding.scss +0 -8
  38. data/stylesheets/singularitygs/mixins/_grid-span.scss +0 -9
  39. data/stylesheets/singularitygs/mixins/_push-pull.scss +0 -41
  40. data/templates/project/behaviors/box-sizing/boxsizing.htc +0 -399
  41. data/templates/project/behaviors/box-sizing/boxsizing.php +0 -23
  42. data/templates/project/manifest.rb +0 -4
@@ -0,0 +1,30 @@
1
+ @function compound($c1: 1, $c2: 1, $c3: 1, $c4: 1, $c5: 1, $c6: 1)
2
+ $common-multiple: ($c1 * $c2 * $c3 * $c4 * $c5 * $c6)
3
+ $compound-grid: ()
4
+ $compound-counter: 1
5
+ @for $i from 1 through $common-multiple
6
+ $add-col: false
7
+ @if $c1 !=1
8
+ @if $i / $c1 == round($i / $c1)
9
+ $add-col: true
10
+ @if $c2 !=1
11
+ @if $i / $c2 == round($i / $c2)
12
+ $add-col: true
13
+ @if $c3 !=1
14
+ @if $i / $c3 == round($i / $c3)
15
+ $add-col: true
16
+ @if $c4 !=1
17
+ @if $i / $c4 == round($i / $c4)
18
+ $add-col: true
19
+ @if $c5 !=1
20
+ @if $i / $c5 == round($i / $c5)
21
+ $add-col: true
22
+ @if $c6 !=1
23
+ @if $i / $c6 == round($i / $c6)
24
+ $add-col: true
25
+ @if $add-col
26
+ $compound-grid: join($compound-grid, $compound-counter, comma)
27
+ $compound-counter: 1
28
+ @else
29
+ $compound-counter: $compound-counter + 1
30
+ @return $compound-grid
@@ -16,9 +16,5 @@
16
16
  $return: reverse($return);
17
17
  }
18
18
 
19
- @if $singularity-debug {
20
- @debug "Grid compounded to #{length($return)} columns";
21
- }
22
-
23
19
  @return $return;
24
20
  }
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: singularitygs
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ prerelease: true
5
5
  segments:
6
6
  - 0
7
- - 0
8
- - 17
9
- version: 0.0.17
7
+ - 1
8
+ - alpha
9
+ version: 0.1.alpha
10
10
  platform: ruby
11
11
  authors:
12
12
  - Scott Kellum
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-11-05 00:00:00 -08:00
18
+ date: 2012-08-06 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -28,8 +28,10 @@ dependencies:
28
28
  segments:
29
29
  - 3
30
30
  - 2
31
- - 1
32
- version: 3.2.1
31
+ - 0
32
+ - alpha
33
+ - 269
34
+ version: 3.2.0.alpha.269
33
35
  type: :runtime
34
36
  version_requirements: *id001
35
37
  - !ruby/object:Gem::Dependency
@@ -42,8 +44,8 @@ dependencies:
42
44
  segments:
43
45
  - 0
44
46
  - 12
45
- - 2
46
- version: 0.12.2
47
+ - 1
48
+ version: 0.12.1
47
49
  type: :runtime
48
50
  version_requirements: *id002
49
51
  - !ruby/object:Gem::Dependency
@@ -56,8 +58,8 @@ dependencies:
56
58
  segments:
57
59
  - 1
58
60
  - 0
59
- - 2
60
- version: 1.0.2
61
+ - 0
62
+ version: 1.0.0
61
63
  type: :runtime
62
64
  version_requirements: *id003
63
65
  - !ruby/object:Gem::Dependency
@@ -86,36 +88,18 @@ extra_rdoc_files: []
86
88
 
87
89
  files:
88
90
  - lib/singularitygs.rb
89
- - stylesheets/_singularitygs.scss
90
- - stylesheets/singularitygs/_background-grid.scss
91
- - stylesheets/singularitygs/_column.scss
92
- - stylesheets/singularitygs/_grid-plugins.scss
93
- - stylesheets/singularitygs/_grid-test.scss
94
- - stylesheets/singularitygs/_grid.scss
95
- - stylesheets/singularitygs/_gutter.scss
96
- - stylesheets/singularitygs/_helpers.scss
97
- - stylesheets/singularitygs/_mixins.scss
98
- - stylesheets/singularitygs/grid-plugins/_compound.scss
99
- - stylesheets/singularitygs/grid-plugins/_ratio-spiral.scss
91
+ - stylesheets/singularitygs.sass
92
+ - stylesheets/singularitygs/_background-grid.sass
93
+ - stylesheets/singularitygs/_column.sass
94
+ - stylesheets/singularitygs/_grid-plugins.sass
95
+ - stylesheets/singularitygs/_grid-test.sass
96
+ - stylesheets/singularitygs/_grid.sass
97
+ - stylesheets/singularitygs/_gridsets.scss
98
+ - stylesheets/singularitygs/_gutter.sass
99
+ - stylesheets/singularitygs/_helpers.sass
100
+ - stylesheets/singularitygs/_mixins.sass
101
+ - stylesheets/singularitygs/grid-plugins/_compound.sass
100
102
  - stylesheets/singularitygs/grid-plugins/_ratio.scss
101
- - stylesheets/singularitygs/grid-structure/_display-table.scss
102
- - stylesheets/singularitygs/grid-structure/_flexbox.scss
103
- - stylesheets/singularitygs/grid-structure/_float.scss
104
- - stylesheets/singularitygs/grid-structure/_grid-layout.scss
105
- - stylesheets/singularitygs/grid-structure/_isolation.scss
106
- - stylesheets/singularitygs/helpers/_grids.scss
107
- - stylesheets/singularitygs/helpers/_gridsets.scss
108
- - stylesheets/singularitygs/helpers/_lists.scss
109
- - stylesheets/singularitygs/mixins/_base-font-size.scss
110
- - stylesheets/singularitygs/mixins/_container.scss
111
- - stylesheets/singularitygs/mixins/_grid-build.scss
112
- - stylesheets/singularitygs/mixins/_grid-objects.scss
113
- - stylesheets/singularitygs/mixins/_grid-padding.scss
114
- - stylesheets/singularitygs/mixins/_grid-span.scss
115
- - stylesheets/singularitygs/mixins/_push-pull.scss
116
- - templates/project/behaviors/box-sizing/boxsizing.htc
117
- - templates/project/behaviors/box-sizing/boxsizing.php
118
- - templates/project/manifest.rb
119
103
  has_rdoc: true
120
104
  homepage: http://singularity.gs
121
105
  licenses: []
@@ -1,68 +0,0 @@
1
- /*! SINGULARITY -- http://singularity.gs/ */
2
- @import "compass";
3
- @import "modular-scale";
4
- @import "breakpoint";
5
-
6
- // Singularity debug output
7
- $singularity-debug: false !default;
8
-
9
- // Can be a number or a list of non-uniform column widths
10
- $columns: 12 !default;
11
-
12
- // Must be of the same unit type of defined columns
13
- $gutter: .25 !default;
14
-
15
- // Grid padding can be any type of unit
16
- $padding: 0 !default;
17
-
18
- // Layout direction?
19
- // options are ltr, rtl, both
20
- $dir: ltr !default;
21
-
22
- // Choose a selector for rtl layouts when using 'both'
23
- $rtl-selector: '[dir="rtl"]' !default;
24
-
25
- // Options for Multiple Grids
26
- $grids: () !default;
27
- $gutters: () !default;
28
- $paddings: () !default;
29
-
30
- $grids-mobile-first: true !default;
31
-
32
- // Container Nonsense
33
- $container: 100% !default;
34
- $containers: () !default;
35
- $container-to-ems: false !default;
36
-
37
- // Base Font Size
38
- $base-font-size: 1em !default;
39
-
40
- // Structural templates for grid
41
- $grouped-styles: false !default;
42
- $output: 'isolation' !default;
43
- @import "singularitygs/grid-structure/isolation";
44
- @import "singularitygs/grid-structure/float";
45
-
46
- // Helpers return think like list sums and column counts
47
- @import "singularitygs/helpers";
48
-
49
- // Compound grid calculation function
50
- @import "singularitygs/grid-plugins";
51
-
52
- // Column math is isolated
53
- @import "singularitygs/column";
54
-
55
- // Gutter math is isolated
56
- @import "singularitygs/gutter";
57
-
58
- // Grid math combines column and gutter math
59
- @import "singularitygs/grid";
60
-
61
- // Mixins to write
62
- @import "singularitygs/mixins";
63
-
64
- // Mixins to write
65
- @import "singularitygs/grid-test";
66
-
67
- // Mixins to write
68
- @import "singularitygs/background-grid";
@@ -1,26 +0,0 @@
1
- // Write stops for single columns
2
- @function grid-gradient-stop($location, $columns, $gutter, $color) {
3
- @if $location == 1 {
4
- @return $color 0%, $color column-span(1, 1, $columns), transparentize($color, 1) column-span(1, 1, $columns);
5
- }
6
- @if $location == column-count($columns) {
7
- @return transparentize($color, 1) column-span($location - 1, 1, $columns) + gutter-span($gutter, $columns), $color column-span($location - 1, 1, $columns) + gutter-span($gutter, $columns), $color 100%;
8
- }
9
- @if $location > 1 {
10
- @return transparentize($color, 1) column-span($location - 1, 1, $columns) + gutter-span($gutter, $columns), $color column-span($location - 1, 1, $columns) + gutter-span($gutter, $columns), $color column-span($location, 1, $columns), transparentize($color, 1) column-span($location, 1, $columns);
11
- }
12
- }
13
-
14
- // Compiling grid stops
15
- @function grid-gradient-stops($columns, $gutter, $color) {
16
- $list: ();
17
- @for $i from 1 through column-count($columns) {
18
- $list: join($list, grid-gradient-stop($i, $columns, $gutter, $color), comma);
19
- }
20
- @return $list;
21
- }
22
-
23
- // Pull in grid stops to make a background gradient
24
- @mixin background-grid($columns: $columns, $gutter: $gutter, $color: rgba(#69aedb, 0.5)) {
25
- @include background(linear-gradient(left, grid-gradient-stops($columns, $gutter, $color)));
26
- }
@@ -1,51 +0,0 @@
1
- // Calculate the width spanning multiple columns
2
- @function column-span($span, $location: 1, $columns: $columns, $gutter: $gutter) {
3
- // if the gutter is a percent, convert it to a ratio
4
-
5
- @if unit($gutter) == '%' {
6
- $gutter: percentage-gutter-conversion($gutter, $columns);
7
- }
8
-
9
- // gutters are a type of column
10
- $columns-and-gutters: column-sum($columns, $gutter);
11
-
12
- // Equal width columns
13
- @if type-of($columns) == number {
14
- $span-and-gutter: $span + (($span - 1) * $gutter);
15
- @return $span-and-gutter / $columns-and-gutters * 100%;
16
- }
17
- // Variable width columns
18
- @if type-of($columns) == list {
19
- // zero out initial sum
20
- $sum: 0;
21
- $holder: ();
22
- // from start point to end point
23
- @for $i from $location to $location + $span {
24
- $holder: append($holder, nth(nth($columns, $i), 1), comma);
25
- }
26
-
27
- @return column-sum($holder, $gutter) / $columns-and-gutters * 100%;
28
- }
29
-
30
- @return 10%;
31
- }
32
-
33
- @function column-sum($columns: $columns, $gutter: $gutter) {
34
-
35
- // if the gutter is a percent, convert it to a ratio
36
- @if unit($gutter) == percentage {
37
- $gutter: percentage-gutter-conversion($gutter, $columns);
38
- }
39
-
40
- @if type-of($columns) == 'number' {
41
- @return $columns + ((column-count($columns) - 1) * $gutter);
42
- }
43
- @else if type-of($columns) == 'list' {
44
- $sum: 0;
45
- @each $column in $columns {
46
- $sum: $sum + nth($column, 1);
47
- }
48
- $sum: $sum + (column-count($columns) - 1) * $gutter;
49
- @return $sum;
50
- }
51
- }
@@ -1,3 +0,0 @@
1
- @import "grid-plugins/compound";
2
- @import "grid-plugins/ratio-spiral";
3
- @import "grid-plugins/ratio";
@@ -1,3 +0,0 @@
1
- @function grid-span($span, $location: 1, $columns: $columns, $gutter: $gutter) {
2
- @return column-span($span, $location, $columns, $gutter);
3
- }
@@ -1,45 +0,0 @@
1
- // percentage conversion
2
- @function percentage-gutter-conversion($percent-gutter, $columns) {
3
-
4
- // find the resolution of the grids
5
- $resolution: 0;
6
- @if length($columns) == 1 {
7
- $resolution: $columns;
8
- }
9
- @else {
10
- @each $column in $columns {
11
- $resolution: $resolution + $column;
12
- }
13
- }
14
-
15
- // divide the percentage gutter by 100% to get the offset
16
- // then multiply be resolution for the full conversion
17
- $new-gutter: ($percent-gutter / 100%) * $resolution;
18
-
19
- @return $new-gutter;
20
- }
21
-
22
-
23
- // Gutters to be removed from columns
24
- @function gutter-offset($gutter, $columns) {
25
-
26
- // if the gutter is a percent, convert it to a ratio
27
- @if unit($gutter) == percentage {
28
- $gutter: percentage-gutter-conversion($gutter, $columns);
29
- }
30
-
31
- $gutter-sum: $gutter * (column-count($columns) - 1);
32
- @return $gutter-sum / column-count($columns);
33
- }
34
-
35
- @function gutter-span($gutter, $columns) {
36
-
37
- // if the gutter is a percent, convert it to a ratio
38
- @if unit($gutter) == percentage {
39
- $gutter: percentage-gutter-conversion($gutter, $columns);
40
- }
41
-
42
- $columns-and-gutters: column-sum($columns, $gutter);
43
-
44
- @return $gutter / $columns-and-gutters * 100%;
45
- }
@@ -1,3 +0,0 @@
1
- @import "helpers/lists";
2
- @import "helpers/grids";
3
- @import "helpers/gridsets";
@@ -1,7 +0,0 @@
1
- @import 'mixins/grid-span';
2
- @import 'mixins/base-font-size';
3
- @import 'mixins/grid-build';
4
- @import 'mixins/container';
5
- @import 'mixins/grid-objects';
6
- @import 'mixins/grid-padding';
7
- @import "mixins/push-pull";
@@ -1,49 +0,0 @@
1
- // 16 arguments can be passed into this function
2
- // a max of 16 comma seperated grids
3
- @function compound($cg1: 1, $cg2: 1, $cg3: 1, $cg4: 1, $cg5: 1, $cg6: 1, $cg7: 1, $cg8: 1, $cg9: 1, $cg10: 1, $cg11: 1, $cg12: 1, $cg13: 1, $cg14: 1, $cg15: 1, $cg16: 1) {
4
-
5
- // merge arguments into a single list.
6
- $compound-grids: $cg1, $cg2, $cg3, $cg4, $cg5, $cg6, $cg7, $cg8, $cg9, $cg10, $cg11, $cg12, $cg13, $cg14, $cg15, $cg16;
7
-
8
- // Find the base resolution of grid
9
- $resolution: 1;
10
- @each $item in $compound-grids {
11
- $resolution: $resolution * $item;
12
- }
13
-
14
- $compound-grid: ();
15
- $compound-counter: 1;
16
- // cycle through each step in grid resolution
17
- @for $i from 1 through $resolution {
18
-
19
- // dont add a column by default
20
- $add-col: false;
21
-
22
- // cycle through all grids to see if any grids match
23
- @each $grid in $compound-grids {
24
-
25
- // if the grid divides evenly into the resolution, add a column
26
- // divide the resolution by number of columns to get the column resolution
27
- @if $i / ($resolution / $grid) == round($i / ($resolution / $grid)) {
28
- $add-col: true;
29
- }
30
- }
31
-
32
- // add the counter value to the compound grid list, reset counter
33
- // this marks where one column ends and a new one begins
34
- @if $add-col {
35
- $compound-grid: join($compound-grid, $compound-counter, comma);
36
- $compound-counter: 1;
37
- }
38
- // if no column is added, bump up counter
39
- @else {
40
- $compound-counter: $compound-counter + 1;
41
- }
42
- }
43
-
44
- @if $singularity-debug {
45
- @debug "Grid compounded to #{length($compound-grid)} columns";
46
- }
47
-
48
- @return $compound-grid;
49
- }
@@ -1,42 +0,0 @@
1
- // centralize spiral steps.
2
- @function ratio-spiral-i($i) {
3
- @return (($i * 2) + 1);
4
- }
5
-
6
- @function ratio-spiral($depth: 5, $ratio: golden(), $invert: false) {
7
-
8
- // write the middle most column, a little out of step from the other columns.
9
- $list: ms(ratio-spiral-i(-$depth) + 1, 100, $ratio);
10
-
11
- // flip the direction the order columns are written in.
12
- @if $invert == false {
13
- @for $i from -($depth - 1) to 0 {
14
- // if the number is even
15
- @if $i/2 == round($i/2) {
16
- // append after the list
17
- $list: append($list, ms(ratio-spiral-i($i), 100, $ratio));
18
- }
19
- @else {
20
- // append before the list
21
- $list: append(ms(ratio-spiral-i($i), 100, $ratio), $list);
22
- }
23
- }
24
- }
25
-
26
- @else {
27
- @for $i from -($depth - 1) to 0 {
28
- @if $i/2 == round($i/2) {
29
- $list: append(ms(ratio-spiral-i($i), 100, $ratio), $list);
30
- }
31
- @else {
32
- $list: append($list, ms(ratio-spiral-i($i), 100, $ratio));
33
- }
34
- }
35
- }
36
-
37
- @if $singularity-debug {
38
- @debug "Grid compounded to #{length($list)} columns";
39
- }
40
-
41
- @return $list;
42
- }