singularitygs 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/singularitygs.rb +1 -1
- data/stylesheets/singularitygs.scss +54 -0
- data/stylesheets/singularitygs/_background-grid.scss +26 -0
- data/stylesheets/singularitygs/_column.scss +50 -0
- data/stylesheets/singularitygs/_grid-plugins.scss +2 -0
- data/stylesheets/singularitygs/_grid-structure.scss +4 -0
- data/stylesheets/singularitygs/{_grid-test.sass → _grid-test.scss} +18 -13
- data/stylesheets/singularitygs/_grid.scss +3 -0
- data/stylesheets/singularitygs/_gutter.scss +11 -0
- data/stylesheets/singularitygs/_helpers.scss +43 -0
- data/stylesheets/singularitygs/_mixins.scss +77 -0
- data/stylesheets/singularitygs/grid-plugins/_compound.scss +46 -0
- data/stylesheets/singularitygs/grid-structure/_structure-clear.scss +32 -0
- data/stylesheets/singularitygs/grid-structure/_structure-display-table.scss +1 -0
- data/stylesheets/singularitygs/grid-structure/_structure-float.scss +103 -0
- data/stylesheets/singularitygs/grid-structure/_structure-grid-layout.scss +1 -0
- metadata +96 -100
- data/stylesheets/singularitygs.sass +0 -40
- data/stylesheets/singularitygs/_background-grid.sass +0 -19
- data/stylesheets/singularitygs/_column.sass +0 -25
- data/stylesheets/singularitygs/_grid-plugins.sass +0 -2
- data/stylesheets/singularitygs/_grid.sass +0 -2
- data/stylesheets/singularitygs/_gutter.sass +0 -4
- data/stylesheets/singularitygs/_helpers.sass +0 -37
- data/stylesheets/singularitygs/_mixins.sass +0 -75
- data/stylesheets/singularitygs/grid-plugins/_compound.sass +0 -30
data/lib/singularitygs.rb
CHANGED
@@ -0,0 +1,54 @@
|
|
1
|
+
/*! SINGULARITY -- http://singularity.gs/ */
|
2
|
+
@import "compass";
|
3
|
+
@import "modular-scale";
|
4
|
+
@import "breakpoint";
|
5
|
+
|
6
|
+
// Can be a number or a list of non-uniform column widths
|
7
|
+
$columns: 12 !default;
|
8
|
+
|
9
|
+
// Must be % or 0
|
10
|
+
$gutter: 2% !default;
|
11
|
+
|
12
|
+
// Grid padding can be any type of unit
|
13
|
+
$padding: 0 !default;
|
14
|
+
|
15
|
+
// Grid structure
|
16
|
+
// Only option is float at the moment
|
17
|
+
$grid-structure: float !default;
|
18
|
+
|
19
|
+
// Layout direction?
|
20
|
+
// options are ltr, rtl, both
|
21
|
+
$dir: ltr !default;
|
22
|
+
|
23
|
+
// Choose a selector for rtl layouts when using 'both'
|
24
|
+
$rtl-selector: '[dir="rtl"]' !default;
|
25
|
+
|
26
|
+
// Helpers return think like list sums and column counts
|
27
|
+
@import "singularitygs/helpers";
|
28
|
+
|
29
|
+
// Compound grid calculation function
|
30
|
+
@import "singularitygs/grid-plugins";
|
31
|
+
|
32
|
+
// Column math is isolated
|
33
|
+
@import "singularitygs/column";
|
34
|
+
|
35
|
+
// Gutter math is isolated
|
36
|
+
@import "singularitygs/gutter";
|
37
|
+
|
38
|
+
// Grid math combines column and gutter math
|
39
|
+
@import "singularitygs/grid";
|
40
|
+
|
41
|
+
// Structural templates for grid
|
42
|
+
@import "singularitygs/grid-structure";
|
43
|
+
|
44
|
+
// Mixins to write
|
45
|
+
@import "singularitygs/mixins";
|
46
|
+
|
47
|
+
// Mixins to write
|
48
|
+
@import "singularitygs/grid-test";
|
49
|
+
|
50
|
+
// Mixins to write
|
51
|
+
@import "singularitygs/background-grid";
|
52
|
+
|
53
|
+
// Gridsets
|
54
|
+
@import "singularitygs/gridsets";
|
@@ -0,0 +1,26 @@
|
|
1
|
+
// Write stops for single columns
|
2
|
+
@function grid-gradient-stop($location, $columns, $gutter, $color) {
|
3
|
+
@if $location == 1 {
|
4
|
+
@return $color 0%, $color grid-span(1, 1, $columns, $gutter), transparentize($color, 1) grid-span(1, 1, $columns, $gutter);
|
5
|
+
}
|
6
|
+
@if $location == column-count($columns) {
|
7
|
+
@return transparentize($color, 1) grid-span($location - 1, 1, $columns, $gutter) + $gutter, $color grid-span($location - 1, 1, $columns, $gutter) + $gutter, $color 100%;
|
8
|
+
}
|
9
|
+
@if $location > 1 {
|
10
|
+
@return transparentize($color, 1) grid-span($location - 1, 1, $columns, $gutter) + $gutter, $color grid-span($location - 1, 1, $columns, $gutter) + $gutter, $color grid-span($location, 1, $columns, $gutter), transparentize($color, 1) grid-span($location, 1, $columns, $gutter);
|
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, $gutter, $color: rgba(#69aedb, 0.5)) {
|
25
|
+
@include background(linear-gradient(left, grid-gradient-stops($columns, $gutter, $color)));
|
26
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
// calculate the width of individual columns
|
2
|
+
//@function list-column-width($location, $columns) {
|
3
|
+
// // send a warning if this is used when $columns is not a list
|
4
|
+
// @if type-of($columns) != list {
|
5
|
+
// @warn "The column-list-sum function requires the variable $columns to be a list.";
|
6
|
+
// }
|
7
|
+
// @else {
|
8
|
+
// // divide the column from its context
|
9
|
+
// @return nth(nth($columns, $location), 1) / list-sum($columns);
|
10
|
+
// }
|
11
|
+
//}
|
12
|
+
|
13
|
+
// Calculate the width spanning multiple columns
|
14
|
+
@function column-span($span, $location: 1, $columns: $columns) {
|
15
|
+
$columns-and-gutters: column-sum($columns, $gutter);
|
16
|
+
|
17
|
+
// Equal width columns
|
18
|
+
@if type-of($columns) == number {
|
19
|
+
$span-and-gutter: $span + (($span - 1) * $gutter);
|
20
|
+
@return $span-and-gutter / $columns-and-gutters * 100%;
|
21
|
+
}
|
22
|
+
// Variable width columns
|
23
|
+
@if type-of($columns) == list {
|
24
|
+
// zero out initial sum
|
25
|
+
$sum: 0;
|
26
|
+
$holder: ();
|
27
|
+
// from start point to end point
|
28
|
+
@for $i from $location to $location + $span {
|
29
|
+
$holder: append($holder, nth(nth($columns, $i), 1), comma);
|
30
|
+
}
|
31
|
+
|
32
|
+
@return column-sum($holder, $gutter) / $columns-and-gutters * 100%;
|
33
|
+
}
|
34
|
+
|
35
|
+
@return 10%;
|
36
|
+
}
|
37
|
+
|
38
|
+
@function column-sum($columns: $columns, $gutter: $gutter) {
|
39
|
+
@if type-of($columns) == 'number' {
|
40
|
+
@return $columns + ((column-count($columns) - 1) * $gutter);
|
41
|
+
}
|
42
|
+
@else if type-of($columns) == 'list' {
|
43
|
+
$sum: 0;
|
44
|
+
@each $column in $columns {
|
45
|
+
$sum: $sum + nth($column, 1);
|
46
|
+
}
|
47
|
+
$sum: $sum + (column-count($columns) - 1) * $gutter;
|
48
|
+
@return $sum;
|
49
|
+
}
|
50
|
+
}
|
@@ -1,16 +1,21 @@
|
|
1
|
-
|
2
|
-
.test-grid
|
3
|
-
height: 200px
|
4
|
-
width: 100
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
.
|
12
|
-
|
13
|
-
|
1
|
+
@mixin test-grid($columns: $columns, $gutter: $gutter, $padding: $padding, $prefix: a, $color: #66bbbb) {
|
2
|
+
.test-grid {
|
3
|
+
height: 200px;
|
4
|
+
width: 100%;
|
5
|
+
}
|
6
|
+
$grid-counter: 1;
|
7
|
+
@for $i from 1 through column-count($columns) {
|
8
|
+
.test.#{$prefix}#{$i} {
|
9
|
+
height: 100%;
|
10
|
+
@include grid-span(1, $i, $columns: $columns, $gutter: $gutter, $padding: $padding);
|
11
|
+
background-color: transparentize($color, 0.5);
|
12
|
+
.inner {
|
13
|
+
height: 100%;
|
14
|
+
background-color: transparentize($color, 0.5);
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
14
19
|
|
15
20
|
// Need this markup to test
|
16
21
|
//<div class="test-grid">
|
@@ -0,0 +1,11 @@
|
|
1
|
+
// Gutters to be removed from columns
|
2
|
+
@function gutter-offset($gutter, $columns) {
|
3
|
+
$gutter-sum: $gutter * (column-count($columns) - 1);
|
4
|
+
@return $gutter-sum / column-count($columns);
|
5
|
+
}
|
6
|
+
|
7
|
+
@function gutter-span($gutter, $columns) {
|
8
|
+
$columns-and-gutters: column-sum($columns, $gutter);
|
9
|
+
|
10
|
+
@return $gutter / $columns-and-gutters * 100%;
|
11
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
// Calculate the total sum of a list (context)
|
2
|
+
@function list-sum($list) {
|
3
|
+
// zero out the initial sum
|
4
|
+
$sum: 0;
|
5
|
+
// loop through each value in the list adding it to $list-sum
|
6
|
+
@for $i from 1 through length($list) {
|
7
|
+
$sum: $sum + nth(nth($list, $i), 1);
|
8
|
+
}
|
9
|
+
@return nth($sum, 1);
|
10
|
+
}
|
11
|
+
|
12
|
+
// Find column count
|
13
|
+
@function column-count($columns) {
|
14
|
+
@if type-of($columns) == number {
|
15
|
+
@return $columns;
|
16
|
+
}
|
17
|
+
@if type-of($columns) == list {
|
18
|
+
@return length($columns);
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
// Context of gutters
|
23
|
+
@function gutter-context($gutter, $context) {
|
24
|
+
@return $gutter * 100% / $context;
|
25
|
+
}
|
26
|
+
|
27
|
+
@function repeat($count, $repeat) {
|
28
|
+
$list: $repeat;
|
29
|
+
@for $i from 2 through $count {
|
30
|
+
$list: join($repeat, $list);
|
31
|
+
}
|
32
|
+
@return $list;
|
33
|
+
}
|
34
|
+
|
35
|
+
// Reverses direction of a list
|
36
|
+
@function reverse($list) {
|
37
|
+
$length: length($list);
|
38
|
+
$return: ();
|
39
|
+
@for $i from 0 to $length {
|
40
|
+
$return: append($return, nth($list, $length - $i), comma);
|
41
|
+
}
|
42
|
+
@return $return;
|
43
|
+
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
// Grid location is automatically counted unless overridden
|
2
|
+
$grid-counter: 1;
|
3
|
+
|
4
|
+
@mixin grid-span($span, $location: $grid-counter, $columns: $columns, $gutter: $gutter, $padding: $padding) {
|
5
|
+
@include box-sizing(border-box);
|
6
|
+
width: grid-span($span, $location, $columns, $gutter);
|
7
|
+
@if $grid-structure == float {
|
8
|
+
@include structure-float($span, $location, $columns, $gutter);
|
9
|
+
}
|
10
|
+
// add special left padding
|
11
|
+
@if type-of($columns) == list {
|
12
|
+
@if type-of(nth($columns, $location)) == list {
|
13
|
+
padding-left: nth(nth($columns, $location), 2);
|
14
|
+
}
|
15
|
+
@else if $padding != 0 {
|
16
|
+
padding-left: $padding;
|
17
|
+
}
|
18
|
+
// add special right padding
|
19
|
+
@if type-of(nth($columns, $location + $span - 1)) == list {
|
20
|
+
padding-right: nth(nth($columns, $location + $span - 1), 2);
|
21
|
+
}
|
22
|
+
@else if $padding != 0 {
|
23
|
+
padding-right: $padding;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
@else if $padding != 0 {
|
27
|
+
padding: 0 $padding;
|
28
|
+
}
|
29
|
+
// bump up the counter
|
30
|
+
$grid-counter: $location + $span;
|
31
|
+
@if $grid-counter > column-count($columns) {
|
32
|
+
$grid-counter: 1;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
// 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.
|
37
|
+
@mixin grid-objects($prefix: a, $columns: $columns, $gutter: $gutter, $padding: $padding, $selector: "%") {
|
38
|
+
$grouped-styles: true;
|
39
|
+
// counter keeps track of the starting position
|
40
|
+
$count: 0;
|
41
|
+
%#{$prefix}column {
|
42
|
+
@if $dir == ltr or $dir == both {
|
43
|
+
margin-right: -100%;
|
44
|
+
float: left;
|
45
|
+
}
|
46
|
+
@if $dir == rtl {
|
47
|
+
margin-left: -100%;
|
48
|
+
float: right;
|
49
|
+
}
|
50
|
+
@if $dir == both {
|
51
|
+
#{$rtl-selector} & {
|
52
|
+
margin-left: -100%;
|
53
|
+
float: right;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
float: left;
|
57
|
+
@include grid-padding($padding);
|
58
|
+
margin-right: $gutter;
|
59
|
+
}
|
60
|
+
@for $i from 1 through column-count($columns) {
|
61
|
+
@for $n from $count + 1 through column-count($columns) {
|
62
|
+
#{$selector}#{$prefix}#{$count}-#{$n} {
|
63
|
+
@extend %#{$prefix}column;
|
64
|
+
@include grid-span($n - $count, $count + 1, $columns, $gutter);
|
65
|
+
}
|
66
|
+
}
|
67
|
+
$count: $count + 1;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
// Add padding to an object on the grid.
|
72
|
+
@mixin grid-padding($padding) {
|
73
|
+
@if $padding != 0 {
|
74
|
+
padding: 0 $padding;
|
75
|
+
@include box-sizing(border-box);
|
76
|
+
}
|
77
|
+
}
|
@@ -0,0 +1,46 @@
|
|
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
|
+
}
|
11
|
+
}
|
12
|
+
@if $c2 != 1 {
|
13
|
+
@if $i / $c2 == round($i / $c2) {
|
14
|
+
$add-col: true;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
@if $c3 != 1 {
|
18
|
+
@if $i / $c3 == round($i / $c3) {
|
19
|
+
$add-col: true;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
@if $c4 != 1 {
|
23
|
+
@if $i / $c4 == round($i / $c4) {
|
24
|
+
$add-col: true;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
@if $c5 != 1 {
|
28
|
+
@if $i / $c5 == round($i / $c5) {
|
29
|
+
$add-col: true;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
@if $c6 != 1 {
|
33
|
+
@if $i / $c6 == round($i / $c6) {
|
34
|
+
$add-col: true;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
@if $add-col {
|
38
|
+
$compound-grid: join($compound-grid, $compound-counter, comma);
|
39
|
+
$compound-counter: 1;
|
40
|
+
}
|
41
|
+
@else {
|
42
|
+
$compound-counter: $compound-counter + 1;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
@return $compound-grid;
|
46
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
$legacy-support-for-ie6: true !default;
|
2
|
+
$legacy-support-for-ie7: true !default;
|
3
|
+
|
4
|
+
@mixin grid-clear($clear-dir) {
|
5
|
+
@if $clear-dir == 'left' {
|
6
|
+
clear: right;
|
7
|
+
}
|
8
|
+
@else if $clear-dir == 'right' {
|
9
|
+
clear: left;
|
10
|
+
}
|
11
|
+
@else if $clear-dir == 'both' {
|
12
|
+
clear: both;
|
13
|
+
}
|
14
|
+
|
15
|
+
|
16
|
+
&:before,
|
17
|
+
&:after {
|
18
|
+
content: "";
|
19
|
+
display: table;
|
20
|
+
}
|
21
|
+
|
22
|
+
&:after {
|
23
|
+
clear: both;
|
24
|
+
}
|
25
|
+
|
26
|
+
@if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
|
27
|
+
/* for IE 6/7 */
|
28
|
+
*zoom: expression(this.runtimeStyle.zoom="1", this.appendChild(document.createElement("br")).style.cssText="clear:both;font:0/0 serif");
|
29
|
+
}
|
30
|
+
/* non-JS fallback */
|
31
|
+
*zoom: 1;
|
32
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,103 @@
|
|
1
|
+
@mixin grid-clear($dir) {
|
2
|
+
@if $dir == 'left' {
|
3
|
+
clear: right;
|
4
|
+
}
|
5
|
+
@else if $dir == 'right' {
|
6
|
+
clear: left;
|
7
|
+
}
|
8
|
+
@else if $dir == 'both' {
|
9
|
+
clear: both;
|
10
|
+
}
|
11
|
+
|
12
|
+
@include clearfix;
|
13
|
+
}
|
14
|
+
|
15
|
+
@mixin structure-float($span, $location: $grid-counter, $columns: $columns, $gutter: $gutter, $grouped-styles: false) {
|
16
|
+
|
17
|
+
$grid-location: '';
|
18
|
+
|
19
|
+
@if ($span + $location) > column-count($columns) {
|
20
|
+
$grid-location: 'last';
|
21
|
+
}
|
22
|
+
@else if $location == 1 {
|
23
|
+
$grid-location: 'first';
|
24
|
+
}
|
25
|
+
@else if $location == column-count($columns) {
|
26
|
+
$grid-location: 'last';
|
27
|
+
}
|
28
|
+
@else {
|
29
|
+
$grid-location: 'middle';
|
30
|
+
}
|
31
|
+
|
32
|
+
@if $dir == ltr or $dir == both {
|
33
|
+
@if $grid-location == 'middle' {
|
34
|
+
@if $grouped-styles == false {
|
35
|
+
margin-right: -100%;
|
36
|
+
float: left;
|
37
|
+
@include grid-clear('left');
|
38
|
+
}
|
39
|
+
margin-left: grid-span($location - 1, 1, $columns, $gutter) + gutter-span($gutter, $columns);
|
40
|
+
}
|
41
|
+
@else if $grid-location == 'first' {
|
42
|
+
@if $grouped-styles == false {
|
43
|
+
margin-right: -100%;
|
44
|
+
float: left;
|
45
|
+
@include grid-clear('left');
|
46
|
+
}
|
47
|
+
margin-left: 0;
|
48
|
+
}
|
49
|
+
@else if $grid-location == 'last' {
|
50
|
+
float: right;
|
51
|
+
margin-right: 0;
|
52
|
+
@include grid-clear('left');
|
53
|
+
}
|
54
|
+
}
|
55
|
+
@if $dir == rtl {
|
56
|
+
@if $grid-location == 'middle' {
|
57
|
+
@if $grouped-styles == false {
|
58
|
+
margin-left: -100%;
|
59
|
+
float: right;
|
60
|
+
@include grid-clear('right');
|
61
|
+
}
|
62
|
+
margin-right: grid-span($location - 1, 1, $columns, $gutter) + gutter-span($gutter, $columns);
|
63
|
+
}
|
64
|
+
@else if grid-location == 'first' {
|
65
|
+
@if $grouped-styles == false {
|
66
|
+
margin-left: -100%;
|
67
|
+
float: right;
|
68
|
+
@include grid-clear('right');
|
69
|
+
}
|
70
|
+
margin-right: 0;
|
71
|
+
}
|
72
|
+
@else if $grid-location == 'last' {
|
73
|
+
float: left;
|
74
|
+
margin-left: 0;
|
75
|
+
@include grid-clear('right');
|
76
|
+
}
|
77
|
+
}
|
78
|
+
@if $dir == both {
|
79
|
+
#{$rtl-selector} & {
|
80
|
+
@if $grid-location == 'middle' {
|
81
|
+
@if $grouped-styles == false {
|
82
|
+
margin-left: -100%;
|
83
|
+
float: right;
|
84
|
+
@include grid-clear('right');
|
85
|
+
}
|
86
|
+
margin-right: grid-span($location - 1, 1, $columns, $gutter) + gutter-span($gutter, $columns);
|
87
|
+
}
|
88
|
+
@if $grid-location == 'first' {
|
89
|
+
@if $grouped-styles == false {
|
90
|
+
margin-left: -100%;
|
91
|
+
float: right;
|
92
|
+
@include grid-clear('right');
|
93
|
+
}
|
94
|
+
margin-right: 0;
|
95
|
+
}
|
96
|
+
@if $grid-location == 'last' {
|
97
|
+
float: left;
|
98
|
+
margin-left: 0;
|
99
|
+
@include grid-clear('right');
|
100
|
+
}
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
|
metadata
CHANGED
@@ -1,135 +1,131 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: singularitygs
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 10
|
9
|
-
version: 0.0.10
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.11
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Scott Kellum
|
13
9
|
- Sam Richard
|
14
10
|
autorequire:
|
15
11
|
bindir: bin
|
16
12
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
13
|
+
date: 2012-08-06 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
22
16
|
name: sass
|
23
|
-
|
24
|
-
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
- 3
|
30
|
-
- 2
|
31
|
-
- 0
|
32
|
-
- alpha
|
33
|
-
- 269
|
34
|
-
version: 3.2.0.alpha.269
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 3.2.1
|
35
23
|
type: :runtime
|
36
|
-
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: compass
|
39
24
|
prerelease: false
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: 3.2.1
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: compass
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: 0.12.2
|
49
39
|
type: :runtime
|
50
|
-
version_requirements: *id002
|
51
|
-
- !ruby/object:Gem::Dependency
|
52
|
-
name: modular-scale
|
53
40
|
prerelease: false
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.12.2
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: modular-scale
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.0.2
|
63
55
|
type: :runtime
|
64
|
-
version_requirements: *id003
|
65
|
-
- !ruby/object:Gem::Dependency
|
66
|
-
name: breakpoint
|
67
56
|
prerelease: false
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 1.0.2
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: breakpoint
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ! '>='
|
69
|
+
- !ruby/object:Gem::Version
|
76
70
|
version: 1.1.1
|
77
71
|
type: :runtime
|
78
|
-
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 1.1.1
|
79
79
|
description: Advanced responsive grid system for Sass and Compass
|
80
|
-
email:
|
80
|
+
email:
|
81
81
|
- scott@scottkellum.com
|
82
82
|
- snugug@gmail.com
|
83
83
|
executables: []
|
84
|
-
|
85
84
|
extensions: []
|
86
|
-
|
87
85
|
extra_rdoc_files: []
|
88
|
-
|
89
|
-
files:
|
86
|
+
files:
|
90
87
|
- lib/singularitygs.rb
|
91
|
-
- stylesheets/singularitygs.
|
92
|
-
- stylesheets/singularitygs/_background-grid.
|
93
|
-
- stylesheets/singularitygs/_column.
|
94
|
-
- stylesheets/singularitygs/_grid-plugins.
|
95
|
-
- stylesheets/singularitygs/_grid-
|
96
|
-
- stylesheets/singularitygs/_grid.
|
88
|
+
- stylesheets/singularitygs.scss
|
89
|
+
- stylesheets/singularitygs/_background-grid.scss
|
90
|
+
- stylesheets/singularitygs/_column.scss
|
91
|
+
- stylesheets/singularitygs/_grid-plugins.scss
|
92
|
+
- stylesheets/singularitygs/_grid-structure.scss
|
93
|
+
- stylesheets/singularitygs/_grid-test.scss
|
94
|
+
- stylesheets/singularitygs/_grid.scss
|
97
95
|
- stylesheets/singularitygs/_gridsets.scss
|
98
|
-
- stylesheets/singularitygs/_gutter.
|
99
|
-
- stylesheets/singularitygs/_helpers.
|
100
|
-
- stylesheets/singularitygs/_mixins.
|
101
|
-
- stylesheets/singularitygs/grid-plugins/_compound.
|
96
|
+
- stylesheets/singularitygs/_gutter.scss
|
97
|
+
- stylesheets/singularitygs/_helpers.scss
|
98
|
+
- stylesheets/singularitygs/_mixins.scss
|
99
|
+
- stylesheets/singularitygs/grid-plugins/_compound.scss
|
102
100
|
- stylesheets/singularitygs/grid-plugins/_ratio.scss
|
103
|
-
|
101
|
+
- stylesheets/singularitygs/grid-structure/_structure-clear.scss
|
102
|
+
- stylesheets/singularitygs/grid-structure/_structure-display-table.scss
|
103
|
+
- stylesheets/singularitygs/grid-structure/_structure-float.scss
|
104
|
+
- stylesheets/singularitygs/grid-structure/_structure-grid-layout.scss
|
104
105
|
homepage: http://singularity.gs
|
105
106
|
licenses: []
|
106
|
-
|
107
107
|
post_install_message:
|
108
108
|
rdoc_options: []
|
109
|
-
|
110
|
-
require_paths:
|
109
|
+
require_paths:
|
111
110
|
- lib
|
112
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
requirements:
|
121
|
-
- -
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
|
124
|
-
- 1
|
125
|
-
- 2
|
126
|
-
version: "1.2"
|
111
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
112
|
+
none: false
|
113
|
+
requirements:
|
114
|
+
- - ! '>='
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
119
|
+
requirements:
|
120
|
+
- - ! '>='
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '1.2'
|
127
123
|
requirements: []
|
128
|
-
|
129
124
|
rubyforge_project: singularitygs
|
130
|
-
rubygems_version: 1.
|
125
|
+
rubygems_version: 1.8.24
|
131
126
|
signing_key:
|
132
127
|
specification_version: 3
|
133
|
-
summary: Singularity is a fluid grid system that can generate uniform columns as well
|
128
|
+
summary: Singularity is a fluid grid system that can generate uniform columns as well
|
129
|
+
as asymmetric and compound grids with tools to write grids as functions, mixins,
|
130
|
+
or class based objects.
|
134
131
|
test_files: []
|
135
|
-
|
@@ -1,40 +0,0 @@
|
|
1
|
-
/*! SINGULARITY -- http://singularity.gs/ */
|
2
|
-
@import compass
|
3
|
-
@import modular-scale
|
4
|
-
@import breakpoint
|
5
|
-
|
6
|
-
// Can be a number or a list of non-uniform column widths
|
7
|
-
$columns: 12 !default
|
8
|
-
|
9
|
-
// Must be % or 0
|
10
|
-
$gutter: 2% !default
|
11
|
-
|
12
|
-
// Grid padding can be any type of unit
|
13
|
-
$padding: 0 !default
|
14
|
-
|
15
|
-
// Helpers return think like list sums and column counts
|
16
|
-
@import singularitygs/helpers
|
17
|
-
|
18
|
-
// Compound grid calculation function
|
19
|
-
@import singularitygs/grid-plugins
|
20
|
-
|
21
|
-
// Column math is isolated
|
22
|
-
@import singularitygs/column
|
23
|
-
|
24
|
-
// Gutter math is isolated
|
25
|
-
@import singularitygs/gutter
|
26
|
-
|
27
|
-
// Grid math combines column and gutter math
|
28
|
-
@import singularitygs/grid
|
29
|
-
|
30
|
-
// Mixins to write
|
31
|
-
@import singularitygs/mixins
|
32
|
-
|
33
|
-
// Mixins to write
|
34
|
-
@import singularitygs/grid-test
|
35
|
-
|
36
|
-
// Mixins to write
|
37
|
-
@import singularitygs/background-grid
|
38
|
-
|
39
|
-
// Gridsets
|
40
|
-
@import singularitygs/gridsets
|
@@ -1,19 +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 grid-span(1, 1, $columns, $gutter), transparentize($color, 1) grid-span(1, 1, $columns, $gutter))
|
5
|
-
@if $location == column-count($columns)
|
6
|
-
@return (transparentize($color, 1) grid-span($location - 1, 1, $columns, $gutter) + $gutter, $color grid-span($location - 1, 1, $columns, $gutter) + $gutter, $color 100%)
|
7
|
-
@if $location > 1
|
8
|
-
@return (transparentize($color, 1) grid-span($location - 1, 1, $columns, $gutter) + $gutter, $color grid-span($location - 1, 1, $columns, $gutter) + $gutter, $color grid-span($location, 1, $columns, $gutter), transparentize($color, 1) grid-span($location, 1, $columns, $gutter))
|
9
|
-
|
10
|
-
// Compiling grid stops
|
11
|
-
@function grid-gradient-stops($columns, $gutter, $color)
|
12
|
-
$list: ()
|
13
|
-
@for $i from 1 through column-count($columns)
|
14
|
-
$list: join($list, grid-gradient-stop($i, $columns, $gutter, $color), comma)
|
15
|
-
@return $list
|
16
|
-
|
17
|
-
// Pull in grid stops to make a background gradient
|
18
|
-
=background-grid($columns, $gutter, $color: rgba(#69AEDB, .5))
|
19
|
-
+background(linear-gradient(left, grid-gradient-stops($columns, $gutter, $color)))
|
@@ -1,25 +0,0 @@
|
|
1
|
-
// calculate the width of individual columns
|
2
|
-
@function list-column-width($location, $columns)
|
3
|
-
// send a warning if this is used when $columns is not a list
|
4
|
-
@if type-of($columns) != list
|
5
|
-
@warn "The column-list-sum function requires the variable $columns to be a list."
|
6
|
-
@else
|
7
|
-
// divide the column from its context
|
8
|
-
@return nth(nth($columns, $location), 1) / list-sum($columns)
|
9
|
-
|
10
|
-
|
11
|
-
// Calculate the width spanning multiple columns
|
12
|
-
@function column-span($span, $location: 1, $columns: $columns)
|
13
|
-
|
14
|
-
// Equal width columns
|
15
|
-
@if type-of($columns) == number
|
16
|
-
@return $span * (100% / $columns)
|
17
|
-
|
18
|
-
// Variable width columns
|
19
|
-
@if type-of($columns) == list
|
20
|
-
// zero out initial sum
|
21
|
-
$sum: 0
|
22
|
-
// from start point to end point
|
23
|
-
@for $i from $location to ($location + $span)
|
24
|
-
$sum: $sum + list-column-width($i, $columns)
|
25
|
-
@return percentage($sum)
|
@@ -1,37 +0,0 @@
|
|
1
|
-
// Calculate the total sum of a list (context)
|
2
|
-
@function list-sum($list)
|
3
|
-
// zero out the initial sum
|
4
|
-
$sum: 0
|
5
|
-
// loop through each value in the list adding it to $list-sum
|
6
|
-
@for $i from 1 through length($list)
|
7
|
-
$sum: $sum + nth(nth($list, $i), 1)
|
8
|
-
@return nth($sum, 1)
|
9
|
-
|
10
|
-
|
11
|
-
// Find column count
|
12
|
-
@function column-count($columns)
|
13
|
-
@if type-of($columns) == number
|
14
|
-
@return $columns
|
15
|
-
@if type-of($columns) == list
|
16
|
-
@return length($columns)
|
17
|
-
|
18
|
-
|
19
|
-
// Context of gutters
|
20
|
-
@function gutter-context($gutter, $context)
|
21
|
-
@return $gutter * (100% / $context)
|
22
|
-
|
23
|
-
@function repeat($count, $repeat)
|
24
|
-
$list: $repeat
|
25
|
-
@for $i from 2 through $count
|
26
|
-
$list: join($repeat, $list)
|
27
|
-
@return $list
|
28
|
-
|
29
|
-
// Reverses direction of a list
|
30
|
-
@function reverse($list)
|
31
|
-
$length: length($list)
|
32
|
-
$return: ()
|
33
|
-
|
34
|
-
@for $i from 0 to $length
|
35
|
-
$return: append($return, nth($list, $length - $i), comma)
|
36
|
-
|
37
|
-
@return $return
|
@@ -1,75 +0,0 @@
|
|
1
|
-
// Grid location is automatically counted unless overridden
|
2
|
-
$grid-counter: 1
|
3
|
-
|
4
|
-
=grid-span($span, $location: $grid-counter, $columns: $columns, $gutter: $gutter, $padding: $padding)
|
5
|
-
@if $location < column-count($columns)
|
6
|
-
float: left
|
7
|
-
@else
|
8
|
-
float: right
|
9
|
-
width: grid-span($span, $location, $columns, $gutter)
|
10
|
-
$box-sizing: false
|
11
|
-
|
12
|
-
// add special left padding
|
13
|
-
@if type-of($columns) == list
|
14
|
-
@if type-of(nth($columns, $location)) == list
|
15
|
-
padding-left: nth(nth($columns, $location), 2)
|
16
|
-
$box-sizing: true
|
17
|
-
@else if $padding != 0
|
18
|
-
padding-left: $padding
|
19
|
-
$box-sizing: true
|
20
|
-
// add special right padding
|
21
|
-
@if type-of(nth($columns, ($location + $span - 1))) == list
|
22
|
-
padding-right: nth(nth($columns, ($location + $span - 1)), 2)
|
23
|
-
$box-sizing: true
|
24
|
-
@else if $padding != 0
|
25
|
-
padding-right: $padding
|
26
|
-
$box-sizing: true
|
27
|
-
|
28
|
-
@else if $padding != 0
|
29
|
-
padding: 0 $padding
|
30
|
-
$box-sizing: true
|
31
|
-
|
32
|
-
@if $box-sizing
|
33
|
-
+box-sizing(border-box)
|
34
|
-
|
35
|
-
// bump up the counter
|
36
|
-
$grid-counter: $location + $span
|
37
|
-
@if $grid-counter > column-count($columns)
|
38
|
-
$grid-counter: 1
|
39
|
-
margin-right: 0
|
40
|
-
@else
|
41
|
-
margin-right: $gutter
|
42
|
-
|
43
|
-
|
44
|
-
// 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.
|
45
|
-
=grid-objects($prefix: a, $columns: $columns, $gutter: $gutter, $padding: $padding, $selector: "%")
|
46
|
-
// counter keeps track of the starting position
|
47
|
-
$count: 0
|
48
|
-
%#{$prefix}column
|
49
|
-
float: left
|
50
|
-
+grid-padding($padding)
|
51
|
-
margin-right: $gutter
|
52
|
-
|
53
|
-
@for $i from 1 through column-count($columns)
|
54
|
-
@for $n from $count + 1 through column-count($columns)
|
55
|
-
#{$selector}#{$prefix}#{$count}-#{$n}
|
56
|
-
@extend %#{$prefix}column
|
57
|
-
width: grid-span($n - $count, $count + 1, $columns, $gutter)
|
58
|
-
@if $n == column-count($columns)
|
59
|
-
margin-right: 0
|
60
|
-
// add special padding
|
61
|
-
@if type-of($columns) == list
|
62
|
-
@if type-of(nth($columns, $count + 1)) == list
|
63
|
-
padding-left: nth(nth($columns, $count + 1), 2)
|
64
|
-
// add special right padding
|
65
|
-
@if type-of(nth($columns, ($n))) == list
|
66
|
-
padding-right: nth(nth($columns, ($n)), 2)
|
67
|
-
$count: $count + 1
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
// Add padding to an object on the grid.
|
72
|
-
=grid-padding($padding)
|
73
|
-
@if $padding != 0
|
74
|
-
padding: 0 $padding
|
75
|
-
+box-sizing(border-box)
|
@@ -1,30 +0,0 @@
|
|
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
|