singularitygs 0.1.alpha → 1.0.alpha.0
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 +68 -0
- data/stylesheets/singularitygs/_background-grid.scss +49 -0
- data/stylesheets/singularitygs/_column.scss +51 -0
- data/stylesheets/singularitygs/_grid-plugins.scss +3 -0
- data/stylesheets/singularitygs/{_grid-test.sass → _grid-test.scss} +22 -13
- data/stylesheets/singularitygs/_grid.scss +6 -0
- data/stylesheets/singularitygs/_gutter.scss +45 -0
- data/stylesheets/singularitygs/_helpers.scss +3 -0
- data/stylesheets/singularitygs/_mixins.scss +7 -0
- data/stylesheets/singularitygs/grid-plugins/_compound.scss +49 -0
- data/stylesheets/singularitygs/grid-plugins/_ratio-spiral.scss +42 -0
- data/stylesheets/singularitygs/grid-plugins/_ratio.scss +4 -0
- data/stylesheets/singularitygs/grid-structure/_display-table.scss +1 -0
- data/stylesheets/singularitygs/grid-structure/_flexbox.scss +0 -0
- data/stylesheets/singularitygs/grid-structure/_float.scss +94 -0
- data/stylesheets/singularitygs/grid-structure/_grid-layout.scss +1 -0
- data/stylesheets/singularitygs/grid-structure/_isolation.scss +145 -0
- data/stylesheets/singularitygs/helpers/_grids.scss +34 -0
- data/stylesheets/singularitygs/helpers/_gridsets.scss +362 -0
- data/stylesheets/singularitygs/helpers/_lists.scss +29 -0
- data/stylesheets/singularitygs/mixins/_base-font-size.scss +63 -0
- data/stylesheets/singularitygs/mixins/_container.scss +63 -0
- data/stylesheets/singularitygs/mixins/_grid-build.scss +16 -0
- data/stylesheets/singularitygs/mixins/_grid-objects.scss +26 -0
- data/stylesheets/singularitygs/mixins/_grid-padding.scss +8 -0
- data/stylesheets/singularitygs/mixins/_grid-span.scss +9 -0
- data/stylesheets/singularitygs/mixins/_push-pull.scss +41 -0
- 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 +39 -22
- 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/_gridsets.scss +0 -242
- 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
@@ -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
|