singularitygs 0.0.11 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/singularitygs.rb +2 -2
- data/stylesheets/{singularitygs.scss → _singularitygs.scss} +9 -2
- data/templates/project/behaviors/box-sizing/boxsizing.htc +399 -0
- data/templates/project/behaviors/box-sizing/boxsizing.php +23 -0
- data/templates/project/manifest.rb +4 -0
- metadata +89 -95
- data/stylesheets/singularitygs/_background-grid.scss +0 -26
- data/stylesheets/singularitygs/_column.scss +0 -50
- data/stylesheets/singularitygs/_grid-plugins.scss +0 -2
- data/stylesheets/singularitygs/_grid-structure.scss +0 -4
- data/stylesheets/singularitygs/_grid-test.scss +0 -54
- data/stylesheets/singularitygs/_grid.scss +0 -3
- data/stylesheets/singularitygs/_gridsets.scss +0 -242
- data/stylesheets/singularitygs/_gutter.scss +0 -11
- data/stylesheets/singularitygs/_helpers.scss +0 -43
- data/stylesheets/singularitygs/_mixins.scss +0 -77
- data/stylesheets/singularitygs/grid-plugins/_compound.scss +0 -46
- data/stylesheets/singularitygs/grid-plugins/_ratio.scss +0 -20
- data/stylesheets/singularitygs/grid-structure/_structure-clear.scss +0 -32
- data/stylesheets/singularitygs/grid-structure/_structure-display-table.scss +0 -1
- data/stylesheets/singularitygs/grid-structure/_structure-float.scss +0 -103
- data/stylesheets/singularitygs/grid-structure/_structure-grid-layout.scss +0 -1
@@ -1,11 +0,0 @@
|
|
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
|
-
}
|
@@ -1,43 +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
|
-
}
|
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
|
-
}
|
@@ -1,77 +0,0 @@
|
|
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
|
-
}
|
@@ -1,46 +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
|
-
}
|
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
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
// Creates a list based on a ratio
|
2
|
-
// Valid options for $start: 'large' or 'small'
|
3
|
-
@function ratio($ratio, $steps, $start: 'small') {
|
4
|
-
$x: 1;
|
5
|
-
$return: ();
|
6
|
-
|
7
|
-
@for $i from 0 through $steps - 1 {
|
8
|
-
$xr: $x * pow($ratio, $i);
|
9
|
-
$return: append($return, $xr, comma);
|
10
|
-
}
|
11
|
-
|
12
|
-
@if $start == 'small' and $ratio < 1 {
|
13
|
-
$return: reverse($return);
|
14
|
-
}
|
15
|
-
@else if $start == 'large' and $ratio > 1 {
|
16
|
-
$return: reverse($return);
|
17
|
-
}
|
18
|
-
|
19
|
-
@return $return;
|
20
|
-
}
|
@@ -1,32 +0,0 @@
|
|
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
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1,103 +0,0 @@
|
|
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
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
|