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 +2 -2
- data/stylesheets/singularitygs/_grid-plugins.scss +1 -0
- data/stylesheets/singularitygs/_gutter.scss +2 -2
- data/stylesheets/singularitygs/grid-plugins/_gridset.scss +16 -0
- data/stylesheets/singularitygs/helpers/_alphabet.scss +1 -0
- data/stylesheets/singularitygs/mixins/_grid-build.scss +0 -2
- data/stylesheets/singularitygs/mixins/_grid-span.scss +28 -6
- metadata +5 -3
data/lib/singularitygs.rb
CHANGED
@@ -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) ==
|
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) ==
|
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;
|
@@ -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
|
-
|
8
|
-
|
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
|
-
-
|
10
|
-
version: 1.0.alpha.
|
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-
|
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
|