singularitygs 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/singularitygs.rb +2 -2
- data/stylesheets/singularitygs/api/_float.scss +4 -8
- data/stylesheets/singularitygs/grids/_add.scss +26 -7
- data/stylesheets/singularitygs/gutters/_add.scss +25 -6
- data/stylesheets/singularitygs/gutters/_find.scss +1 -1
- data/stylesheets/singularitygs/helpers/_find.scss +28 -23
- data/templates/demos/{float.html → float.html.erb} +2 -1
- data/templates/demos/{isolation.html → isolation.html.erb} +2 -1
- data/templates/demos/manifest.rb +2 -2
- metadata +8 -8
data/lib/singularitygs.rb
CHANGED
@@ -30,16 +30,16 @@
|
|
30
30
|
|
31
31
|
@if $end-row {
|
32
32
|
float: $opp;
|
33
|
+
margin-#{$opp}: 0%;
|
33
34
|
}
|
34
35
|
@else {
|
35
36
|
float: $dir;
|
36
37
|
|
37
38
|
@if $start-row {
|
38
39
|
margin-#{$dir}: 0%;
|
40
|
+
|
39
41
|
}
|
40
|
-
|
41
|
-
margin-#{$opp}: gutter-span($gutter, $columns);
|
42
|
-
}
|
42
|
+
margin-#{$opp}: gutter-span($gutter, $columns);
|
43
43
|
}
|
44
44
|
}
|
45
45
|
|
@@ -56,6 +56,7 @@
|
|
56
56
|
|
57
57
|
@if $end-row {
|
58
58
|
float: $opp;
|
59
|
+
margin-#{$opp}: 0%;
|
59
60
|
}
|
60
61
|
@else {
|
61
62
|
float: $dir;
|
@@ -63,11 +64,6 @@
|
|
63
64
|
@if $start-row {
|
64
65
|
margin-#{$dir}: 0%;
|
65
66
|
}
|
66
|
-
@else {
|
67
|
-
margin-#{$opp}: gutter-span($gutter, $columns);
|
68
|
-
}
|
69
|
-
|
70
|
-
margin-#{$dir}: 0;
|
71
67
|
margin-#{$opp}: gutter-span($gutter, $columns);
|
72
68
|
}
|
73
69
|
}
|
@@ -1,10 +1,29 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
// Accepts a grid definition in the human-readable format. Converts it to the internal format,
|
2
|
+
// appends it to a list of grids and returns the resulting list.
|
3
|
+
//
|
4
|
+
// Note that this function only returns a new list, it does not modify the source list.
|
5
|
+
//
|
6
|
+
// add-grid($grid-definition, $append-to-list)
|
7
|
+
// - $grid-definition : <definition> See documentation for syntax:
|
8
|
+
// https://github.com/Team-Sass/Singularity/wiki/Creating-Grids
|
9
|
+
// - $append-to-list : [list] A list to append to.
|
10
|
+
// Defaults to $grids if none is specified.
|
11
|
+
@function add-grid($grid-definition, $append-to-list: $grids) {
|
12
|
+
$parsed: parse-add($grid-definition); // Converts the definiton to a temporary format:
|
13
|
+
// either `((<grid>))` or `((<grid>) (<breakpoint>))`
|
14
|
+
$grid: nth($parsed, 1); // E. g. `(<grid>)`.
|
15
|
+
$breakpoint: nth($parsed, 2); // Either `(<breakpoint>)` or false.
|
16
|
+
$list-length: length($append-to-list);
|
17
|
+
|
18
|
+
// Check whether the definition will be the first one in the list
|
19
|
+
// and whether it has no breakpoint specified.
|
20
|
+
@if $breakpoint == false and $list-length == 0 {
|
21
|
+
// Returns the first item of the list, e. g. `(<grid>)`
|
22
|
+
@return $grid;
|
6
23
|
}
|
7
24
|
@else {
|
8
|
-
|
25
|
+
// Appends to a comma-separated list of definitions in the internal format
|
26
|
+
// and returns it, e. g. `(<grid>), (<grid> <breakpoint>), (<grid> <breakpoint>)`
|
27
|
+
@return append($append-to-list, ($grid $breakpoint), 'comma');
|
9
28
|
}
|
10
|
-
}
|
29
|
+
}
|
@@ -1,10 +1,29 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
// Accepts a gutter definition in the human-readable format. Converts it to the internal format,
|
2
|
+
// appends it to a list of gutter and returns the resulting list.
|
3
|
+
//
|
4
|
+
// Note that this function only returns a new list, it does not modify the source list.
|
5
|
+
//
|
6
|
+
// add-gutter($grid-definition, $append-to-list)
|
7
|
+
// - $gutter-definition : <definition> See documentation for syntax:
|
8
|
+
// https://github.com/Team-Sass/Singularity/wiki/Creating-Grids
|
9
|
+
// - $append-to-list : [list] A list to append to.
|
10
|
+
// Defaults to $gutters if none is specified.
|
11
|
+
@function add-gutter($gutter-definition, $append-to-list: $gutters) {
|
12
|
+
$parsed: parse-add($gutter-definition); // Converts the definiton to a temporary format:
|
13
|
+
// either `((<gutter>))` or `((<gutter>) (<breakpoint>))`
|
14
|
+
$gutter: nth($parsed, 1); // E. g. `(<gutter>)`.
|
15
|
+
$breakpoint: nth($parsed, 2); // Either `(<breakpoint>)` or false.
|
16
|
+
$list-length: length($append-to-list);
|
3
17
|
|
4
|
-
|
5
|
-
|
18
|
+
// Check whether the definition will be the first one in the list
|
19
|
+
// and whether it has no breakpoint specified.
|
20
|
+
@if $breakpoint == false and $list-length == 0 {
|
21
|
+
// Returns the first item of the list, e. g. `(<gutter>)`
|
22
|
+
@return $gutter;
|
6
23
|
}
|
7
24
|
@else {
|
8
|
-
|
25
|
+
// Appends to a comma-separated list of definitions in the internal format
|
26
|
+
// and returns it, e. g. `(<gutter>), (<gutter> <breakpoint>), (<gutter> <breakpoint>)`
|
27
|
+
@return append($append-to-list, ($gutter $breakpoint), 'comma');
|
9
28
|
}
|
10
|
-
}
|
29
|
+
}
|
@@ -38,35 +38,40 @@
|
|
38
38
|
$context: $query-max;
|
39
39
|
}
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
@else {
|
52
|
-
// Loop through each MQ.
|
53
|
-
@for $j from 1 through $rg-length {
|
54
|
-
$query: nth(nth($reverse-haystack, $j), 2);
|
55
|
-
|
56
|
-
// If the MQ is greather than or equal to the the MQ in question, use it! (mobile first)
|
57
|
-
@if ($mobile-first) {
|
58
|
-
@if $context >= $query {
|
59
|
-
@return nth(nth($reverse-haystack, $j), 1);
|
60
|
-
}
|
41
|
+
// Loop over each item in Context to find if any of the items pass.
|
42
|
+
@each $query-context in $context {
|
43
|
+
@if $query-context != false {
|
44
|
+
// If it's smallest than the smallest MQ, use the 1st grid
|
45
|
+
@if $query-context < $smallest {
|
46
|
+
@return nth($haystack, 1);
|
47
|
+
}
|
48
|
+
// If it's larger than or equal to the largest MQ, use the last grid
|
49
|
+
@else if $query-context >= $largest {
|
50
|
+
@return nth(nth($reverse-haystack, 1), 1);
|
61
51
|
}
|
62
|
-
// If
|
52
|
+
// If it's in between the smallest and largest, go run a check.
|
63
53
|
@else {
|
64
|
-
|
65
|
-
|
54
|
+
// Loop through each MQ.
|
55
|
+
@for $j from 1 through $rg-length {
|
56
|
+
$query: nth(nth($reverse-haystack, $j), 2);
|
57
|
+
|
58
|
+
// If the MQ is greather than or equal to the the MQ in question, use it! (mobile first)
|
59
|
+
@if ($mobile-first) {
|
60
|
+
@if $query-context >= $query {
|
61
|
+
@return nth(nth($reverse-haystack, $j), 1);
|
62
|
+
}
|
63
|
+
}
|
64
|
+
// If the MQ is less than or equal to the the MQ in question, use it! (not mobile first)
|
65
|
+
@else {
|
66
|
+
@if $query-context <= $query {
|
67
|
+
@return nth(nth($reverse-haystack, $j), 1);
|
68
|
+
}
|
69
|
+
}
|
66
70
|
}
|
67
71
|
}
|
68
72
|
}
|
69
73
|
}
|
74
|
+
@return nth($haystack, 1);
|
70
75
|
}
|
71
76
|
// All else fails, return the first grid
|
72
77
|
@else {
|
@@ -1,7 +1,8 @@
|
|
1
|
+
<% project_name = File.basename(Compass.configuration.project_path) %><% project_js = Compass.configuration.javascripts_dir %><% project_css = Compass.configuration.css_dir %>
|
1
2
|
<html>
|
2
3
|
<head>
|
3
4
|
<title>Singularity HTML Demo</title>
|
4
|
-
<link rel="stylesheet" href="
|
5
|
+
<link rel="stylesheet" href="<%= project_css %>/demo-float.css">
|
5
6
|
</head>
|
6
7
|
<body>
|
7
8
|
<div id="page">
|
@@ -1,7 +1,8 @@
|
|
1
|
+
<% project_name = File.basename(Compass.configuration.project_path) %><% project_js = Compass.configuration.javascripts_dir %><% project_css = Compass.configuration.css_dir %>
|
1
2
|
<html>
|
2
3
|
<head>
|
3
4
|
<title>Singularity HTML Demo</title>
|
4
|
-
<link rel="stylesheet" href="
|
5
|
+
<link rel="stylesheet" href="<%= project_css %>/demo-isolation.css">
|
5
6
|
</head>
|
6
7
|
<body>
|
7
8
|
<div id="page">
|
data/templates/demos/manifest.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
description "Singularity Demos"
|
2
2
|
|
3
3
|
discover :stylesheets
|
4
|
-
file 'isolation.html', :to => 'isolation.html'
|
5
|
-
file 'float.html', :to => 'float.html'
|
4
|
+
file 'isolation.html.erb', :to => 'isolation.html', :erb => true
|
5
|
+
file 'float.html.erb', :to => 'float.html', :erb => true
|
6
6
|
|
7
7
|
help %Q{
|
8
8
|
For help with Singularity, please ask a question on Stack Overflow (http://stackoverflow.com/questions/ask) tagged with "singularitygs".
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 1.0.
|
8
|
+
- 5
|
9
|
+
version: 1.0.5
|
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: 2013-04-
|
18
|
+
date: 2013-04-05 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
segments:
|
57
|
+
- 2
|
58
|
+
- 0
|
57
59
|
- 1
|
58
|
-
|
59
|
-
- 1
|
60
|
-
version: 1.1.1
|
60
|
+
version: 2.0.1
|
61
61
|
type: :runtime
|
62
62
|
version_requirements: *id003
|
63
63
|
description: Advanced responsive grid system for Sass and Compass
|
@@ -105,8 +105,8 @@ files:
|
|
105
105
|
- templates/box-sizing/manifest.rb
|
106
106
|
- templates/demos/demo-float.scss
|
107
107
|
- templates/demos/demo-isolation.scss
|
108
|
-
- templates/demos/float.html
|
109
|
-
- templates/demos/isolation.html
|
108
|
+
- templates/demos/float.html.erb
|
109
|
+
- templates/demos/isolation.html.erb
|
110
110
|
- templates/demos/manifest.rb
|
111
111
|
- templates/project/grid.js
|
112
112
|
- templates/project/grid.min.js
|