susy 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,13 @@
1
1
  Susy Changelog
2
2
  ==============
3
3
 
4
+ v1.0.7 [March 19, 2013]
5
+ -----------------------
6
+
7
+ * Fix edge-case where `$container-style` and `$container-width` cause conflict.
8
+
4
9
  v1.0.6 [March 18, 2013]
5
- ---------------------
10
+ -----------------------
6
11
 
7
12
  * Add `isolate` and `isolate-grid` mixins.
8
13
  * Add `bleed` mixin.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.6
1
+ 1.0.7
@@ -29,6 +29,24 @@ $rem-with-px-fallback : true !default;
29
29
  @return $clean;
30
30
  }
31
31
 
32
+ // ---------------------------------------------------------------------------
33
+ // Don't use static output when it will break things
34
+
35
+ // Switch element-level output to fluid, when container-width is wrong for static
36
+ //
37
+ // fix-static-misalignment([$style, $width])
38
+ // - $style: $container-style.
39
+ // - $width: $container-width.
40
+ @function fix-static-misalignment(
41
+ $style: $container-style,
42
+ $width: $container-width
43
+ ) {
44
+ @if $container-width and $container-width != container-outer-width($width: false) {
45
+ $style: fluid;
46
+ }
47
+ @return $style;
48
+ }
49
+
32
50
  // ---------------------------------------------------------------------------
33
51
  // Grid Functions
34
52
 
@@ -88,7 +106,7 @@ $rem-with-px-fallback : true !default;
88
106
  // $style : The container style to use.
89
107
  @function column(
90
108
  $context : $total-columns,
91
- $style : $container-style
109
+ $style : fix-static-misalignment()
92
110
  ) {
93
111
  @return if($style == static, $column-width, relative-width($column-width, $context));
94
112
  }
@@ -101,7 +119,7 @@ $rem-with-px-fallback : true !default;
101
119
  @function columns(
102
120
  $columns,
103
121
  $context : $total-columns,
104
- $style : $container-style
122
+ $style : fix-static-misalignment()
105
123
  ) {
106
124
  @return if($style == static, columns-width($columns), relative-width(columns-width($columns), $context));
107
125
  }
@@ -112,7 +130,7 @@ $rem-with-px-fallback : true !default;
112
130
  // $style : The container style to use.
113
131
  @function gutter(
114
132
  $context : $total-columns,
115
- $style : $container-style
133
+ $style : fix-static-misalignment()
116
134
  ) {
117
135
  @return if($style == static, $gutter-width, relative-width($gutter-width, $context));
118
136
  }
@@ -137,7 +155,7 @@ $rem-with-px-fallback : true !default;
137
155
  @function space(
138
156
  $columns,
139
157
  $context : $total-columns,
140
- $style : $container-style
158
+ $style : fix-static-misalignment()
141
159
  ) {
142
160
  @return columns($columns, $context, $style) + if($columns >= 1, gutter($context), 0);
143
161
  }
@@ -112,7 +112,7 @@
112
112
  $context : $total-columns,
113
113
  $padding : false,
114
114
  $from : $from-direction,
115
- $style : $container-style
115
+ $style : fix-static-misalignment()
116
116
  ) {
117
117
  $from : unquote($from);
118
118
  $to : opposite-position($from);
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "susy"
5
- s.version = "1.0.6"
5
+ s.version = "1.0.7"
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 = "2013-03-18"
9
+ s.date = "2013-03-20"
10
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.md", "lib/susy.rb"]
@@ -114,3 +114,19 @@
114
114
  *margin-left: -1em;
115
115
  display: inline;
116
116
  }
117
+
118
+ /* ---------------------------------------------------------------------------
119
+ /* Static output */
120
+ .static {
121
+ width: 9em;
122
+ float: left;
123
+ margin-right: 1em;
124
+ display: inline;
125
+ }
126
+
127
+ .force-fluid {
128
+ width: 15.25424%;
129
+ float: left;
130
+ margin-right: 1.69492%;
131
+ display: inline;
132
+ }
@@ -57,3 +57,20 @@
57
57
 
58
58
  // Reset $border-box-sizing so it doesn't have other effects
59
59
  $border-box-sizing: false;
60
+
61
+ /* ---------------------------------------------------------------------------
62
+ /* Static output */
63
+
64
+ $container-style: static;
65
+
66
+ .static {
67
+ @include span-columns(2);
68
+ }
69
+
70
+ .force-fluid {
71
+ $container-width: 960px;
72
+ @include span-columns(2);
73
+ $container-width: false;
74
+ }
75
+
76
+ $container-style: magic;
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: susy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 6
10
- version: 1.0.6
9
+ - 7
10
+ version: 1.0.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Eric Meyer
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-03-18 00:00:00 Z
18
+ date: 2013-03-20 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: compass