susy 1.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.mkdn +7 -0
- data/VERSION +1 -1
- data/sass/susy/_functions.scss +34 -10
- data/sass/susy/_grid.scss +14 -15
- data/susy.gemspec +2 -2
- data/test/css/grid.css +3 -3
- data/test/css/media.css +1 -1
- metadata +3 -2
data/CHANGELOG.mkdn
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
Susy Changelog
|
2
2
|
==============
|
3
3
|
|
4
|
+
v1.0.1 [Sept 12, 2012]
|
5
|
+
----------------------
|
6
|
+
|
7
|
+
* Fix a bug in the relationship between `$container-width` and `$border-box-sizing`,
|
8
|
+
so that grid-padding is subtracted from the width in certain cases.
|
9
|
+
* Reset right margin to `auto` rather than `0` with `remove-omega`.
|
10
|
+
|
4
11
|
v1.0 [Aug 14, 2012]
|
5
12
|
-------------------
|
6
13
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0
|
1
|
+
1.0.1
|
data/sass/susy/_functions.scss
CHANGED
@@ -25,13 +25,41 @@ $browser-default-font-size-pt : 12pt;
|
|
25
25
|
@return ($columns * $column-width) + (if($columns >= 1, ceil($columns - 1), 0) * $gutter-width);
|
26
26
|
}
|
27
27
|
|
28
|
+
// Return the grid width after adding or subtracting grid padding
|
29
|
+
//
|
30
|
+
// $width : the width of the grid without padding;
|
31
|
+
// $operation : ( add | subtract ) if padding should be added or subtracted;
|
32
|
+
@function handle-grid-padding(
|
33
|
+
$width,
|
34
|
+
$operation : subtract
|
35
|
+
) {
|
36
|
+
$pad: $grid-padding*2;
|
37
|
+
|
38
|
+
@if comparable($width, $grid-padding) {
|
39
|
+
$width: if($operation == subtract, $width - $pad, $width + $pad);
|
40
|
+
} @else {
|
41
|
+
@warn "$grid-padding must be set in units comparable to the container width.";
|
42
|
+
}
|
43
|
+
|
44
|
+
@return $width;
|
45
|
+
}
|
46
|
+
|
28
47
|
// Return the full outer width of a Container element.
|
29
48
|
//
|
30
49
|
// $columns : The number of columns in the Grid Layout.
|
31
50
|
@function container-outer-width(
|
32
51
|
$columns : $total-columns
|
33
52
|
) {
|
34
|
-
|
53
|
+
$width: columns-width();
|
54
|
+
|
55
|
+
@if $container-width {
|
56
|
+
$width: $container-width;
|
57
|
+
@if not $border-box-sizing { $width: handle-grid-padding($width, subtract); }
|
58
|
+
} @else {
|
59
|
+
@if $border-box-sizing { $width: handle-grid-padding($width, add); }
|
60
|
+
}
|
61
|
+
|
62
|
+
@return $width;
|
35
63
|
}
|
36
64
|
|
37
65
|
// Return the percentage width of a single column in a given 'context'.
|
@@ -41,7 +69,6 @@ $browser-default-font-size-pt : 12pt;
|
|
41
69
|
$context : $total-columns
|
42
70
|
) {
|
43
71
|
@return relative-width($column-width, $context);
|
44
|
-
|
45
72
|
}
|
46
73
|
|
47
74
|
// Return the percentage width of multiple 'columns' in a given 'context'.
|
@@ -259,22 +286,19 @@ $browser-default-font-size-pt : 12pt;
|
|
259
286
|
@function get-layout (
|
260
287
|
$min
|
261
288
|
) {
|
262
|
-
$
|
263
|
-
$
|
264
|
-
$layout-width : container-outer-width();
|
289
|
+
$columns : 1;
|
290
|
+
$layout-width : container-outer-width($columns);
|
265
291
|
$return : false;
|
266
292
|
$min : fix-ems($min);
|
267
293
|
|
268
294
|
@if comparable($min, $layout-width) {
|
269
295
|
@while $min >= $layout-width {
|
270
|
-
$
|
271
|
-
$layout-width : container-outer-width();
|
296
|
+
$columns : $columns + 1;
|
297
|
+
$layout-width : container-outer-width($columns);
|
272
298
|
}
|
273
|
-
$return : $
|
299
|
+
$return : $columns;
|
274
300
|
}
|
275
301
|
|
276
|
-
$total-columns : $default-layout;
|
277
|
-
|
278
302
|
@return $return;
|
279
303
|
}
|
280
304
|
|
data/sass/susy/_grid.scss
CHANGED
@@ -18,15 +18,12 @@
|
|
18
18
|
// Container
|
19
19
|
|
20
20
|
// Set the width of a container
|
21
|
-
|
22
|
-
$
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
@warn "$grid-padding must be set in units comparable to column and gutter widths, in order for $border-box-sizing to work properly.";
|
28
|
-
}
|
29
|
-
}
|
21
|
+
//
|
22
|
+
// $columns : The number of columns in the Grid Layout.
|
23
|
+
@mixin set-container-width(
|
24
|
+
$columns : $total-columns
|
25
|
+
){
|
26
|
+
$width: container-outer-width($columns);
|
30
27
|
|
31
28
|
@if $container-style == 'static' {
|
32
29
|
width: $width;
|
@@ -35,17 +32,19 @@
|
|
35
32
|
width: if(unit($width) == '%', $width, auto);
|
36
33
|
} @else {
|
37
34
|
max-width: $width;
|
38
|
-
@if $legacy-support-for-ie6 {
|
39
|
-
_width: $width;
|
40
|
-
}
|
35
|
+
@if $legacy-support-for-ie6 { _width: $width; }
|
41
36
|
}
|
42
37
|
}
|
43
38
|
}
|
44
39
|
|
45
40
|
// Set the outer grid-containing element(s).
|
46
|
-
|
41
|
+
//
|
42
|
+
// $columns : The number of columns in the container.
|
43
|
+
@mixin apply-container(
|
44
|
+
$columns : $total-columns
|
45
|
+
){
|
47
46
|
@include pie-clearfix;
|
48
|
-
@include set-container-width;
|
47
|
+
@include set-container-width($columns);
|
49
48
|
margin: { left: auto; right: auto; }
|
50
49
|
padding: { left: $grid-padding; right: $grid-padding; }
|
51
50
|
}
|
@@ -211,7 +210,7 @@
|
|
211
210
|
margin-#{$to}: gutter($context);
|
212
211
|
|
213
212
|
@if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
|
214
|
-
#margin-#{$hack}:
|
213
|
+
#margin-#{$hack}: auto;
|
215
214
|
}
|
216
215
|
}
|
217
216
|
|
data/susy.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{susy}
|
5
|
-
s.version = "1.0"
|
5
|
+
s.version = "1.0.1"
|
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 = %q{2012-
|
9
|
+
s.date = %q{2012-09-11}
|
10
10
|
s.description = %q{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 = %q{eric@oddbird.net}
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG.mkdn", "LICENSE.txt", "README.md", "lib/susy.rb"]
|
data/test/css/grid.css
CHANGED
@@ -27,7 +27,7 @@
|
|
27
27
|
display: table;
|
28
28
|
clear: both;
|
29
29
|
}
|
30
|
-
@media (min-width:
|
30
|
+
@media (min-width: 69em) {
|
31
31
|
.complex-container {
|
32
32
|
max-width: 69em;
|
33
33
|
}
|
@@ -76,13 +76,13 @@
|
|
76
76
|
.remove-omega {
|
77
77
|
float: left;
|
78
78
|
margin-right: 1.69492%;
|
79
|
-
#margin-left:
|
79
|
+
#margin-left: auto;
|
80
80
|
}
|
81
81
|
|
82
82
|
.remove-nth-omega:last-child {
|
83
83
|
float: left;
|
84
84
|
margin-right: 1.69492%;
|
85
|
-
#margin-left:
|
85
|
+
#margin-left: auto;
|
86
86
|
}
|
87
87
|
|
88
88
|
/* ---------------------------------------------------------------------------
|
data/test/css/media.css
CHANGED
metadata
CHANGED
@@ -5,7 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
|
8
|
+
- 1
|
9
|
+
version: 1.0.1
|
9
10
|
platform: ruby
|
10
11
|
authors:
|
11
12
|
- Eric Meyer
|
@@ -13,7 +14,7 @@ autorequire:
|
|
13
14
|
bindir: bin
|
14
15
|
cert_chain: []
|
15
16
|
|
16
|
-
date: 2012-
|
17
|
+
date: 2012-09-11 00:00:00 -06:00
|
17
18
|
default_executable:
|
18
19
|
dependencies:
|
19
20
|
- !ruby/object:Gem::Dependency
|