susy 1.0.alpha.2 → 1.0.rc.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.mkdn +6 -0
- data/Manifest +0 -1
- data/README.mkdn +26 -107
- data/Rakefile +3 -3
- data/VERSION +1 -1
- data/susy.gemspec +8 -5
- metadata +26 -9
- data/REFERENCE.mkdn +0 -301
data/CHANGELOG.mkdn
CHANGED
data/Manifest
CHANGED
data/README.mkdn
CHANGED
@@ -1,107 +1,26 @@
|
|
1
|
-
Susy
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
sudo gem install susy
|
28
|
-
compass create <project name> -r susy -u susy
|
29
|
-
|
30
|
-
Grid Basics
|
31
|
-
-----------
|
32
|
-
|
33
|
-
_(This now refers to the unreleased 1.0 version of Susy.)_
|
34
|
-
|
35
|
-
### Settings:
|
36
|
-
|
37
|
-
Set up your default grid values: total columns, column width, and gutter width.
|
38
|
-
|
39
|
-
```scss
|
40
|
-
$total-columns : 12; /* a 12-column grid */
|
41
|
-
$column-width : 4em; /* each column is 4em wide */
|
42
|
-
$gutter-width : 1em; /* 1em gutters between columns */
|
43
|
-
$grid-padding : $gutter-width; /* 1em padding on the grid */
|
44
|
-
```
|
45
|
-
|
46
|
-
### Mixins:
|
47
|
-
|
48
|
-
The basic grid is composed using two simple mixins:
|
49
|
-
* Apply the `container` mixin to create your initial grid context.
|
50
|
-
* Apply the `span-columns` mixin to declare the width of an element on the grid.
|
51
|
-
|
52
|
-
Use the 'omega' trigger to declare elements that span the _final_ column of
|
53
|
-
their parent element, and pass a 'context' in nested situations. The
|
54
|
-
'context' for any element is equal to the number of columns spanned by it's
|
55
|
-
parent.
|
56
|
-
|
57
|
-
For example:
|
58
|
-
|
59
|
-
```scss
|
60
|
-
#page {
|
61
|
-
@include container;
|
62
|
-
/* If you want padding on the grid, just add it to the container. */
|
63
|
-
|
64
|
-
/*
|
65
|
-
full-width items like the header don't need any help from Susy:
|
66
|
-
header { ... }
|
67
|
-
*/
|
68
|
-
|
69
|
-
nav { @include span-columns(3); }
|
70
|
-
|
71
|
-
#content {
|
72
|
-
@include span-columns(9 omega);
|
73
|
-
|
74
|
-
#main { @include span-columns(6,9); }
|
75
|
-
aside { @include span-columns(3 omega,9); }
|
76
|
-
}
|
77
|
-
|
78
|
-
footer { clear: both; }
|
79
|
-
}
|
80
|
-
```
|
81
|
-
|
82
|
-
Layouts and Breakpoints
|
83
|
-
-----------------------
|
84
|
-
|
85
|
-
The point is to change layouts (number of columns in the grid) at breakpoints. If you supply only a breakpoint, Susy will supply the closest layout. If you supply only a layout, Susy will provide the closest breakpoint.
|
86
|
-
|
87
|
-
```scss
|
88
|
-
/* Switch to a 12-column grid when there is room for one. */
|
89
|
-
@include at-breakpoint(12) {
|
90
|
-
.container { @include container; }
|
91
|
-
}
|
92
|
-
|
93
|
-
/* At a min-width of 30em, switch to the nearest fitting layout. */
|
94
|
-
@include at-breakpoint(30em) {
|
95
|
-
.container { @include container; }
|
96
|
-
}
|
97
|
-
|
98
|
-
/* Between the min-width of 30em and the max-width of 60em,
|
99
|
-
use a 10-column layout. Provide a fallback class for IE. */
|
100
|
-
@include at-breakpoint(30em 10 60em ie) {
|
101
|
-
.container { @include container; }
|
102
|
-
}
|
103
|
-
|
104
|
-
/* Create all your container layouts in one go.
|
105
|
-
Each argument accepts min/layout/max/ie, same as at-breakpoint. */
|
106
|
-
.container { @include container(4,8,12); }
|
107
|
-
```
|
1
|
+
# Susy [a Compass plugin]
|
2
|
+
|
3
|
+
Susy is a semantic CSS grid system with a responsive twist.
|
4
|
+
|
5
|
+
The web is a responsive place,
|
6
|
+
from your lithe & lively development process
|
7
|
+
to your end user's super-tablet-multi-magic-lap-phone.
|
8
|
+
You need grids that are powerful, but custom;
|
9
|
+
reliable, but responsive.
|
10
|
+
|
11
|
+
Susy grids are fluid on the inside,
|
12
|
+
ready to respond at any moment,
|
13
|
+
but contained in the candy shell of your choice,
|
14
|
+
so they respond how and when and where you want them to.
|
15
|
+
|
16
|
+
This isn't another one-size-fits-all grid framework
|
17
|
+
that will make your sites look identical
|
18
|
+
and litter your markup with meaningless "col2of5" jargon.
|
19
|
+
We don't design your site or write your markup,
|
20
|
+
we just do the math and get out of your way.
|
21
|
+
|
22
|
+
## Resources
|
23
|
+
- [Website](http://susy.oddbird.net)
|
24
|
+
- [Changelog](https://github.com/ericam/susy/blob/master/CHANGELOG.mkdn)
|
25
|
+
- [Tutorial](https://github.com/ericam/susy/blob/master/docs/source/guides/getting-started.html.md)
|
26
|
+
- [Reference](https://github.com/ericam/susy/blob/master/docs/source/guides/reference.html.md#basic-usage)
|
data/Rakefile
CHANGED
@@ -5,12 +5,12 @@ begin
|
|
5
5
|
require 'echoe'
|
6
6
|
|
7
7
|
Echoe.new('susy', open('VERSION').read) do |p|
|
8
|
-
p.summary = "
|
9
|
-
p.description = "
|
8
|
+
p.summary = "Responsive grids for Compass."
|
9
|
+
p.description = "Susy grids are fluid on the inside, ready to respond at any moment, but contained in the candy shell of your choice, so they respond how and when and where you want them to. We don't design your site or dictate your markup, we just do the math and get out of your way."
|
10
10
|
p.url = "http://susy.oddbird.net/"
|
11
11
|
p.author = "Eric Meyer"
|
12
12
|
p.email = "eric@oddbird.net"
|
13
|
-
p.dependencies = ["compass >=0.12.2.rc.0"]
|
13
|
+
p.dependencies = ["compass >=0.12.2.rc.0", "sass >=3.2.0.alpha.237"]
|
14
14
|
end
|
15
15
|
|
16
16
|
rescue LoadError => boom
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.rc.0
|
data/susy.gemspec
CHANGED
@@ -2,31 +2,34 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "susy"
|
5
|
-
s.version = "1.0.
|
5
|
+
s.version = "1.0.rc.0"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Eric Meyer"]
|
9
|
-
s.date = "2012-05-
|
10
|
-
s.description = "
|
9
|
+
s.date = "2012-05-13"
|
10
|
+
s.description = "Susy grids are fluid on the inside, ready to respond at any moment, but contained in the candy shell of your choice, so they respond how and when and where you want them to. We don't design your site or dictate your markup, we just do the math and get out of your way."
|
11
11
|
s.email = "eric@oddbird.net"
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG.mkdn", "LICENSE.txt", "README.mkdn", "lib/susy.rb"]
|
13
|
-
s.files = ["CHANGELOG.mkdn", "LICENSE.txt", "Manifest", "README.mkdn", "
|
13
|
+
s.files = ["CHANGELOG.mkdn", "LICENSE.txt", "Manifest", "README.mkdn", "Rakefile", "VERSION", "lib/susy.rb", "sass/_susy.scss", "sass/susy/_background.scss", "sass/susy/_functions.scss", "sass/susy/_grid.scss", "sass/susy/_margin.scss", "sass/susy/_media.scss", "sass/susy/_padding.scss", "sass/susy/_settings.scss", "susy.gemspec", "templates/project/_base.scss", "templates/project/manifest.rb", "templates/project/screen.scss"]
|
14
14
|
s.homepage = "http://susy.oddbird.net/"
|
15
15
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Susy", "--main", "README.mkdn"]
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
s.rubyforge_project = "susy"
|
18
18
|
s.rubygems_version = "1.8.15"
|
19
|
-
s.summary = "
|
19
|
+
s.summary = "Responsive grids for Compass."
|
20
20
|
|
21
21
|
if s.respond_to? :specification_version then
|
22
22
|
s.specification_version = 3
|
23
23
|
|
24
24
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
25
25
|
s.add_runtime_dependency(%q<compass>, [">= 0.12.2.rc.0"])
|
26
|
+
s.add_runtime_dependency(%q<sass>, [">= 3.2.0.alpha.237"])
|
26
27
|
else
|
27
28
|
s.add_dependency(%q<compass>, [">= 0.12.2.rc.0"])
|
29
|
+
s.add_dependency(%q<sass>, [">= 3.2.0.alpha.237"])
|
28
30
|
end
|
29
31
|
else
|
30
32
|
s.add_dependency(%q<compass>, [">= 0.12.2.rc.0"])
|
33
|
+
s.add_dependency(%q<sass>, [">= 3.2.0.alpha.237"])
|
31
34
|
end
|
32
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: susy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: -3651558062
|
5
5
|
prerelease: 4
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
-
|
11
|
-
version: 1.0.
|
9
|
+
- rc
|
10
|
+
- 0
|
11
|
+
version: 1.0.rc.0
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Eric Meyer
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-05-
|
19
|
+
date: 2012-05-13 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: compass
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: -3651558046
|
30
30
|
segments:
|
31
31
|
- 0
|
32
32
|
- 12
|
@@ -36,7 +36,25 @@ dependencies:
|
|
36
36
|
version: 0.12.2.rc.0
|
37
37
|
type: :runtime
|
38
38
|
version_requirements: *id001
|
39
|
-
|
39
|
+
- !ruby/object:Gem::Dependency
|
40
|
+
name: sass
|
41
|
+
prerelease: false
|
42
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
hash: -1706356446
|
48
|
+
segments:
|
49
|
+
- 3
|
50
|
+
- 2
|
51
|
+
- 0
|
52
|
+
- alpha
|
53
|
+
- 237
|
54
|
+
version: 3.2.0.alpha.237
|
55
|
+
type: :runtime
|
56
|
+
version_requirements: *id002
|
57
|
+
description: Susy grids are fluid on the inside, ready to respond at any moment, but contained in the candy shell of your choice, so they respond how and when and where you want them to. We don't design your site or dictate your markup, we just do the math and get out of your way.
|
40
58
|
email: eric@oddbird.net
|
41
59
|
executables: []
|
42
60
|
|
@@ -52,7 +70,6 @@ files:
|
|
52
70
|
- LICENSE.txt
|
53
71
|
- Manifest
|
54
72
|
- README.mkdn
|
55
|
-
- REFERENCE.mkdn
|
56
73
|
- Rakefile
|
57
74
|
- VERSION
|
58
75
|
- lib/susy.rb
|
@@ -106,6 +123,6 @@ rubyforge_project: susy
|
|
106
123
|
rubygems_version: 1.8.15
|
107
124
|
signing_key:
|
108
125
|
specification_version: 3
|
109
|
-
summary:
|
126
|
+
summary: Responsive grids for Compass.
|
110
127
|
test_files: []
|
111
128
|
|
data/REFERENCE.mkdn
DELETED
@@ -1,301 +0,0 @@
|
|
1
|
-
Susy Basics
|
2
|
-
===========
|
3
|
-
|
4
|
-
```scss
|
5
|
-
@import 'susy';
|
6
|
-
```
|
7
|
-
|
8
|
-
## Terms
|
9
|
-
|
10
|
-
- **Susy Grid**: A grid that you build with Susy.
|
11
|
-
- **Column**: The main unit of horizontal measurement on the _Grid_.
|
12
|
-
- **Layout**: The total number of _Columns_ in a grid.
|
13
|
-
- **Gutter**: The space between _Columns_.
|
14
|
-
- **Grid Padding**: Padding between the _Grid_ and the document edges.
|
15
|
-
- **Grid Element**: Any HTML element that is aligned to a _Grid_.
|
16
|
-
- **Container**: The root element of a _Grid_.
|
17
|
-
- **Context**: The number of _Columns_ spanned by the parent element.
|
18
|
-
- **Omega**: Any _Grid Element_ spanning the last _Column_ in its _Context_.
|
19
|
-
|
20
|
-
## Settings
|
21
|
-
|
22
|
-
```scss
|
23
|
-
$total-columns : 12 !default;
|
24
|
-
```
|
25
|
-
**Total Columns**: `$total-columns: <number>;`
|
26
|
-
- _The number of Columns in your Susy Grid Layout._
|
27
|
-
- `<number>`: Unitless number.
|
28
|
-
- Default: `12`.
|
29
|
-
|
30
|
-
```scss
|
31
|
-
$column-width : 4em !default;
|
32
|
-
```
|
33
|
-
**Column Width**: `$column-width: <length>;`
|
34
|
-
- _The width of a single Column in your Susy Grid._
|
35
|
-
- `<length>`: Length in em, px, %, etc.
|
36
|
-
- Default: `4em`.
|
37
|
-
|
38
|
-
```scss
|
39
|
-
$gutter-width : 1em !default;
|
40
|
-
```
|
41
|
-
**Gutter Width**: `$gutter-width: <length>;`
|
42
|
-
- _The width of space between Columns._
|
43
|
-
- `<length>`: Units must match `$column-width`.
|
44
|
-
- Default: `1em`.
|
45
|
-
|
46
|
-
```scss
|
47
|
-
$grid-padding : $gutter-width !default;
|
48
|
-
```
|
49
|
-
**Grid Padding**: `$grid-padding: <length>;`
|
50
|
-
- _Padding on the left and right of a grid container._
|
51
|
-
- `<length>`: Units must match `$column-width`.
|
52
|
-
- Default: `$gutter-width`.
|
53
|
-
|
54
|
-
## Mixins
|
55
|
-
|
56
|
-
```scss
|
57
|
-
.page { @include container; }
|
58
|
-
```
|
59
|
-
**Container**: `container([$<media-layout>]*)`
|
60
|
-
- _Apply to the outer grid-containing element._
|
61
|
-
- `<$media-layout>`: Optional media-layout shortcuts
|
62
|
-
(see 'Responsive Grids' below).
|
63
|
-
- Default: `$total-columns`.
|
64
|
-
|
65
|
-
```scss
|
66
|
-
nav { @include span-columns(3,12); }
|
67
|
-
article { @include span-columns(9 omega,12); }
|
68
|
-
```
|
69
|
-
**Span Columns**: `span-columns(<$columns> [<omega> , <$context>, <$from>])`
|
70
|
-
- _Apply to any element to align it with the Susy Grid._
|
71
|
-
- `<$columns>`: The number of _Columns_ to span, with optional `<omega>` flag.
|
72
|
-
- `<$context>`: Current nesting _Context_.
|
73
|
-
- Default: `$total-columns`.
|
74
|
-
- `<$from>`: The origin direction of your document flow.
|
75
|
-
- Default: `$from-direction`.
|
76
|
-
|
77
|
-
```scss
|
78
|
-
.gallery-image {
|
79
|
-
@include span-columns(3,9); // each gallery-image is 3 of 9 cols.
|
80
|
-
&:nth-child(3n) { @include omega; } // every third image completes a row.
|
81
|
-
}
|
82
|
-
```
|
83
|
-
**Omega**: `omega([<$from>])`
|
84
|
-
- _Apply to any omega element as an override._
|
85
|
-
- `<$from>`: The origin direction of your document flow.
|
86
|
-
- Default: `$from-direction`.
|
87
|
-
|
88
|
-
-------------------------------------------------------------------------------
|
89
|
-
|
90
|
-
Responsive Grids
|
91
|
-
================
|
92
|
-
|
93
|
-
## Terms
|
94
|
-
|
95
|
-
- **Breakpoint**: A min- or max- viewport width at which to change _Layouts_.
|
96
|
-
- **Media-Layout**: Shortcut for declaring _Breakpoints_ and _Layouts_ in Susy:
|
97
|
-
- `<min-width> <layout> <max-width> <ie-fallback>`
|
98
|
-
- You must supply either `<min>` or `<layout>`.
|
99
|
-
|
100
|
-
```scss
|
101
|
-
// Example Media-Layouts
|
102
|
-
|
103
|
-
$media-layout: 12; // Use 12-col layout at matching min-width.
|
104
|
-
$media-layout: 30em; // At min 30em, use closest fitting layout.
|
105
|
-
$media-layout: 30em 12; // At min 30em, use 12-col layout.
|
106
|
-
$media-layout: 12 60em; // Use 12 cols up to max 60em.
|
107
|
-
$media-layout: 30em 60em; // Between min 30em & max 60em, use closest layout.
|
108
|
-
$media-layout: 30em 12 60em;// Use 12 cols between min 30em & max 60em.
|
109
|
-
$media-layout: 60em 12 30em;// Same. Larger length will always be max-width.
|
110
|
-
|
111
|
-
$media-layout : 12 lt-ie9; // Output is included under `.lt-ie9` class,
|
112
|
-
// for use with IE conditional comments
|
113
|
-
// on the <html> tag.
|
114
|
-
```
|
115
|
-
|
116
|
-
## Mixins
|
117
|
-
|
118
|
-
```scss
|
119
|
-
$total-columns: 4;
|
120
|
-
|
121
|
-
.container {
|
122
|
-
@include container; // Establish a default 4-col container.
|
123
|
-
@include at-breakpoint(10) { // At min-width == 10-cols, use 10-col layout.
|
124
|
-
@include container; // Establish a 10-col container inside @media.
|
125
|
-
}
|
126
|
-
}
|
127
|
-
```
|
128
|
-
**At-Breakpoint**:
|
129
|
-
`at-breakpoint(<$media-layout> [, <$font-size>]) { <@content> }`
|
130
|
-
- _At a given min- or max-width Breakpoint, use a given Layout._
|
131
|
-
- `<$media-layout>`: The _Breakpoint/Layout_ combo to use (see above).
|
132
|
-
- `<$font-size>`: When using EMs for your grid, the font size is important.
|
133
|
-
- Default: `$base-font-size`.
|
134
|
-
- `<@content>`: Nested @content block will use the given _Layout_.
|
135
|
-
|
136
|
-
```scss
|
137
|
-
$total-columns: 4;
|
138
|
-
|
139
|
-
.container-9 {
|
140
|
-
@include layout(9) { // Change total-columns to 9 for all nested code.
|
141
|
-
@include container; // Establish a 9-col container.
|
142
|
-
}
|
143
|
-
}
|
144
|
-
```
|
145
|
-
**Layout**: `layout(<$layout-cols>) { <@content> }`
|
146
|
-
- _Set an arbitrary Layout to use with any block of content._
|
147
|
-
- `<$layout-cols>`: The number of _Columns_ to use in the _Layout_.
|
148
|
-
- `<@content>`: Nested @content block will use the given _Layout_.
|
149
|
-
|
150
|
-
-------------------------------------------------------------------------------
|
151
|
-
|
152
|
-
Grid Helpers
|
153
|
-
============
|
154
|
-
|
155
|
-
## Padding Mixins
|
156
|
-
|
157
|
-
**Prefix**: `prefix(<$columns> [, <$context>, <$from>])`
|
158
|
-
- _Add Columns of empty space as `padding` before an element._
|
159
|
-
- `<$columns>`: The number of _Columns_ to be added as `padding` before.
|
160
|
-
- `<$context>`: The _Context_.
|
161
|
-
- Default: `$total-columns`.
|
162
|
-
- `<$from>`: The origin direction of your document flow.
|
163
|
-
Default `$from-direction`.
|
164
|
-
|
165
|
-
**Suffix**: `suffix(<$columns> [, <$context>, <$from>])`
|
166
|
-
- _Add columns of empty space as padding after an element._
|
167
|
-
- `<$columns>`: The number of _Columns_ to be added as `padding` after.
|
168
|
-
- `<$context>`: The _Context_.
|
169
|
-
- Default: `$total-columns`.
|
170
|
-
- `<$from>`: The origin direction of your document flow.
|
171
|
-
- Default: `$from-direction`.
|
172
|
-
|
173
|
-
**Pad**: `pad([<$prefix>, <$suffix>, <$context>, <$from>])`
|
174
|
-
- _Shortcut for adding both Prefix and Suffix `padding`._
|
175
|
-
- `<$prefix>`: The number of _Columns_ to be added as `padding` before.
|
176
|
-
- `<$suffix>`: The number of _Columns_ to be added as `padding` after.
|
177
|
-
- `<$context>`: The _Context_.
|
178
|
-
- Default: `$total-columns`.
|
179
|
-
- `<$from>`: The origin direction of your document flow.
|
180
|
-
- Default: `$from-direction`.
|
181
|
-
|
182
|
-
## Margin Mixins
|
183
|
-
|
184
|
-
**Pre**: `pre(<$columns> [, <$context>, <$from>])`
|
185
|
-
- _Add columns of empty space as margin before an element._
|
186
|
-
- `<$columns>`: The number of _Columns_ to be added as `margin` before.
|
187
|
-
- `<$context>`: The _Context_.
|
188
|
-
- Default: `$total-columns`.
|
189
|
-
- `<$from>`: The origin direction of your document flow.
|
190
|
-
- Default: `$from-direction`.
|
191
|
-
|
192
|
-
**Post**: `post(<$columns> [, <$context>, <$from>])`
|
193
|
-
- _Add columns of empty space as margin after an element._
|
194
|
-
- `<$columns>`: The number of _Columns_ to be added as `margin` after.
|
195
|
-
- `<$context>`: The _Context_.
|
196
|
-
- Default: `$total-columns`.
|
197
|
-
- `<$from>`: The origin direction of your document flow.
|
198
|
-
- Default: `$from-direction`.
|
199
|
-
|
200
|
-
**Squish**: `squish([<$pre>, <$post>, <$context>, <$from>])`
|
201
|
-
- _Shortcut to add empty space as margin before and after an element._
|
202
|
-
- `<$pre>`: The number of _Columns_ to be added as `margin` before.
|
203
|
-
- `<$post>`: The number of _Columns_ to be added as `margin` after.
|
204
|
-
- `<$context>`: The _Context_.
|
205
|
-
- Default: `$total-columns`.
|
206
|
-
- `<$from>`: The origin direction of your document flow.
|
207
|
-
- Default: `$from-direction`.
|
208
|
-
|
209
|
-
**Push**: `push(<$columns> [, <$context>, <$from>])`
|
210
|
-
- _Add positive margins before an element, to push it with the flow._
|
211
|
-
_Identical to `pre`._
|
212
|
-
|
213
|
-
**Pull**: `pull(<$columns> [, <$context>, <$from>])`
|
214
|
-
- _Add negative margins before an element, to pull it against the flow._
|
215
|
-
- `<$columns>`: The number of _Columns_ to be subtracted as `margin` before.
|
216
|
-
- `<$context>`: The _Context_.
|
217
|
-
- Default: `$total-columns`.
|
218
|
-
- `<$from>`: The origin direction of your document flow.
|
219
|
-
- Default: `$from-direction`.
|
220
|
-
|
221
|
-
## Grid Background Image
|
222
|
-
|
223
|
-
**Susy Grid Background**: `susy-grid-background()`
|
224
|
-
- _Apply to a Container to see the Susy Grid as a background-image._
|
225
|
-
- Some browsers have trouble with sub-pixel rounding on background images.
|
226
|
-
Use it for checking general spacing, not pixel-exact alignment.
|
227
|
-
|
228
|
-
## Functions
|
229
|
-
|
230
|
-
Where a mixin returns property/value pairs, functions return simple values
|
231
|
-
that you can put where you want, and use for advanced math.
|
232
|
-
|
233
|
-
```scss
|
234
|
-
.item { width: columns(3,6); }
|
235
|
-
```
|
236
|
-
**Columns**: `columns(<$columns> [, <$context>])`
|
237
|
-
- _Identical to `span-columns` mixin, but returns the math-ready `%`._
|
238
|
-
- `<$columns>`: The number of _Columns_ to span,
|
239
|
-
- `<$context>`: The _Context_.
|
240
|
-
- Default: `$total-columns`.
|
241
|
-
|
242
|
-
```scss
|
243
|
-
.item { margin-right: gutter(6) + columns(3,6); }
|
244
|
-
```
|
245
|
-
**Gutter**: `gutter([<$context>])`
|
246
|
-
- _The `%` width of one gutter in any given context._
|
247
|
-
- `<$context>`: The _Context_.
|
248
|
-
- Default: `$total-columns`.
|
249
|
-
|
250
|
-
```scss
|
251
|
-
.item { margin-right: space(3,6); }
|
252
|
-
```
|
253
|
-
**Space**: `space(<$columns> [, <$context>])`
|
254
|
-
- _Total `%` space taken by Columns, including internal AND external gutters._
|
255
|
-
- `<$columns>`: The number of _Columns_ to span,
|
256
|
-
- `<$context>`: The _Context_.
|
257
|
-
- Default: `$total-columns`.
|
258
|
-
|
259
|
-
## Container Override Settings
|
260
|
-
|
261
|
-
```scss
|
262
|
-
$container-width : false !default;
|
263
|
-
```
|
264
|
-
**Container Width**: `$container-width: <length>;`
|
265
|
-
- _Override the total width of your grid with an arbitrary length._
|
266
|
-
- `<length>`: Length in em, px, %, etc.
|
267
|
-
- Default: `false`.
|
268
|
-
|
269
|
-
```scss
|
270
|
-
$container-style : magic !default;
|
271
|
-
```
|
272
|
-
**Container Style**: `$container-style: <style>;`
|
273
|
-
- _The type of shell containing your grid._
|
274
|
-
- `<style>`: `magic` | `static` | `fluid`.
|
275
|
-
- Default: `magic`.
|
276
|
-
- `magic`: The Susy Special Sauce (TM). A magic grid has a set width,
|
277
|
-
but becomes fluid rather than overflowing the viewport.
|
278
|
-
- `static`: A static grid will retain the width defined in your settings.
|
279
|
-
- `fluid`: A fluid grid will always be based on the viewport width.
|
280
|
-
The percentage will be determined by your grid settings,
|
281
|
-
or by `$container-width`, if either is set using `%` units.
|
282
|
-
Otherwise it will default to `auto` (100%).
|
283
|
-
|
284
|
-
## Direction Override Settings
|
285
|
-
|
286
|
-
```scss
|
287
|
-
$from-direction : left !default;
|
288
|
-
```
|
289
|
-
**From Direction**: `$from-direction: <direction>;`
|
290
|
-
- _The side of the Susy Grid from which the flow starts._
|
291
|
-
_For ltr documents, this is the left._
|
292
|
-
- `<direction>`: `left` | `right`
|
293
|
-
- Default: `left`
|
294
|
-
|
295
|
-
```scss
|
296
|
-
$omega-float : opposite-position($from-direction) !default;
|
297
|
-
```
|
298
|
-
**Omega Float**: `$omega-float: <direction>;`
|
299
|
-
- _The direction that Omega elements should be floated._
|
300
|
-
- `<direction>`: `left` | `right`
|
301
|
-
- Default: `opposite-position($from-direction)`
|