susy 1.0.9 → 2.2.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +1 -1
  3. data/README.md +20 -115
  4. data/VERSION +1 -1
  5. data/docs/changelog.rst +783 -0
  6. data/lib/compass-susy.rb +1 -0
  7. data/lib/susy.rb +14 -4
  8. data/sass/_su.scss +4 -0
  9. data/sass/_susy.scss +3 -15
  10. data/sass/_susyone.scss +4 -0
  11. data/sass/susy/_su.scss +7 -0
  12. data/sass/susy/language/_susy.scss +24 -0
  13. data/sass/susy/language/_susyone.scss +13 -0
  14. data/sass/susy/language/susy/_background.scss +385 -0
  15. data/sass/susy/language/susy/_bleed.scss +200 -0
  16. data/sass/susy/language/susy/_box-sizing.scss +47 -0
  17. data/sass/susy/language/susy/_breakpoint-plugin.scss +185 -0
  18. data/sass/susy/language/susy/_container.scss +81 -0
  19. data/sass/susy/language/susy/_context.scss +36 -0
  20. data/sass/susy/language/susy/_gallery.scss +94 -0
  21. data/sass/susy/language/susy/_grids.scss +64 -0
  22. data/sass/susy/language/susy/_gutters.scss +154 -0
  23. data/sass/susy/language/susy/_isolate.scss +77 -0
  24. data/sass/susy/language/susy/_margins.scss +94 -0
  25. data/sass/susy/language/susy/_padding.scss +74 -0
  26. data/sass/susy/language/susy/_rows.scss +138 -0
  27. data/sass/susy/language/susy/_settings.scss +216 -0
  28. data/sass/susy/language/susy/_span.scss +163 -0
  29. data/sass/susy/language/susy/_validation.scss +16 -0
  30. data/sass/susy/{_background.scss → language/susyone/_background.scss} +0 -0
  31. data/sass/susy/{_functions.scss → language/susyone/_functions.scss} +23 -22
  32. data/sass/susy/{_grid.scss → language/susyone/_grid.scss} +76 -50
  33. data/sass/susy/{_isolation.scss → language/susyone/_isolation.scss} +0 -0
  34. data/sass/susy/{_margin.scss → language/susyone/_margin.scss} +0 -0
  35. data/sass/susy/{_media.scss → language/susyone/_media.scss} +26 -33
  36. data/sass/susy/{_padding.scss → language/susyone/_padding.scss} +0 -0
  37. data/sass/susy/{_settings.scss → language/susyone/_settings.scss} +4 -0
  38. data/sass/susy/output/_float.scss +9 -0
  39. data/sass/susy/output/_shared.scss +15 -0
  40. data/sass/susy/output/_support.scss +9 -0
  41. data/sass/susy/output/float/_container.scss +16 -0
  42. data/sass/susy/output/float/_end.scss +40 -0
  43. data/sass/susy/output/float/_isolate.scss +22 -0
  44. data/sass/susy/output/float/_span.scss +35 -0
  45. data/sass/susy/output/shared/_background.scss +26 -0
  46. data/sass/susy/output/shared/_container.scss +21 -0
  47. data/sass/susy/output/shared/_direction.scss +42 -0
  48. data/sass/susy/output/shared/_inspect.scss +25 -0
  49. data/sass/susy/output/shared/_margins.scss +23 -0
  50. data/sass/susy/output/shared/_output.scss +14 -0
  51. data/sass/susy/output/shared/_padding.scss +23 -0
  52. data/sass/susy/output/support/_background.scss +58 -0
  53. data/sass/susy/output/support/_box-sizing.scss +19 -0
  54. data/sass/susy/output/support/_clearfix.scss +18 -0
  55. data/sass/susy/output/support/_prefix.scss +19 -0
  56. data/sass/susy/output/support/_rem.scss +22 -0
  57. data/sass/susy/output/support/_support.scss +95 -0
  58. data/sass/susy/su/_grid.scss +103 -0
  59. data/sass/susy/su/_settings.scss +73 -0
  60. data/sass/susy/su/_utilities.scss +111 -0
  61. data/sass/susy/su/_validation.scss +57 -0
  62. data/templates/project/_grids.scss +9 -0
  63. data/templates/project/manifest.rb +6 -10
  64. data/templates/project/style.scss +4 -0
  65. metadata +106 -111
  66. data/CHANGELOG.mkdn +0 -296
  67. data/Manifest +0 -39
  68. data/Rakefile +0 -19
  69. data/sass/susy/_support.scss +0 -198
  70. data/sass/susy/_units.scss +0 -159
  71. data/susy.gemspec +0 -35
  72. data/templates/project/_base.scss +0 -14
  73. data/templates/project/screen.scss +0 -12
  74. data/test/config.rb +0 -10
  75. data/test/css/background.css +0 -16
  76. data/test/css/bleed.css +0 -20
  77. data/test/css/functions.css +0 -7
  78. data/test/css/grid.css +0 -134
  79. data/test/css/isolation.css +0 -46
  80. data/test/css/margin.css +0 -20
  81. data/test/css/media.css +0 -101
  82. data/test/css/padding.css +0 -12
  83. data/test/scss/background.scss +0 -11
  84. data/test/scss/bleed.scss +0 -19
  85. data/test/scss/functions.scss +0 -15
  86. data/test/scss/grid.scss +0 -77
  87. data/test/scss/isolation.scss +0 -19
  88. data/test/scss/margin.scss +0 -27
  89. data/test/scss/media.scss +0 -50
  90. data/test/scss/padding.scss +0 -19
data/Manifest DELETED
@@ -1,39 +0,0 @@
1
- CHANGELOG.mkdn
2
- LICENSE.txt
3
- Manifest
4
- README.md
5
- Rakefile
6
- VERSION
7
- lib/susy.rb
8
- sass/_susy.scss
9
- sass/susy/_background.scss
10
- sass/susy/_functions.scss
11
- sass/susy/_grid.scss
12
- sass/susy/_isolation.scss
13
- sass/susy/_margin.scss
14
- sass/susy/_media.scss
15
- sass/susy/_padding.scss
16
- sass/susy/_settings.scss
17
- sass/susy/_support.scss
18
- sass/susy/_units.scss
19
- susy.gemspec
20
- templates/project/_base.scss
21
- templates/project/manifest.rb
22
- templates/project/screen.scss
23
- test/config.rb
24
- test/css/background.css
25
- test/css/bleed.css
26
- test/css/functions.css
27
- test/css/grid.css
28
- test/css/isolation.css
29
- test/css/margin.css
30
- test/css/media.css
31
- test/css/padding.css
32
- test/scss/background.scss
33
- test/scss/bleed.scss
34
- test/scss/functions.scss
35
- test/scss/grid.scss
36
- test/scss/isolation.scss
37
- test/scss/margin.scss
38
- test/scss/media.scss
39
- test/scss/padding.scss
data/Rakefile DELETED
@@ -1,19 +0,0 @@
1
- require 'fileutils'
2
- require 'sass'
3
-
4
- begin
5
- require 'echoe'
6
-
7
- Echoe.new('susy', open('VERSION').read) do |p|
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
- p.url = "http://susy.oddbird.net/"
11
- p.author = "Eric Meyer"
12
- p.email = "eric@oddbird.net"
13
- p.dependencies = ["compass >=0.12.2", "sass >=3.2.0"]
14
- end
15
-
16
- rescue LoadError => boom
17
- puts "You are missing a dependency required for meta-operations on this gem."
18
- puts "#{boom.to_s.capitalize}."
19
- end
@@ -1,198 +0,0 @@
1
- // @@@ These helpers only live here until they land in Compass.
2
-
3
- // ---------------------------------------------------------------------------
4
- // Imports
5
-
6
- @import "compass/support";
7
-
8
- // ---------------------------------------------------------------------------
9
- // Helpers
10
-
11
- // A debug tool for checking browser support
12
- @mixin debug-support-matrix($experimental: true, $ie: true) {
13
- @debug #{'$moz-'}$experimental-support-for-mozilla
14
- #{'$webkit-'}$experimental-support-for-webkit
15
- #{'$microsoft-'}$experimental-support-for-microsoft
16
- #{'$opera-'}$experimental-support-for-opera
17
- #{'$khtml-'}$experimental-support-for-khtml;
18
- @debug #{'$ie6-'}$legacy-support-for-ie6
19
- #{'$ie7-'}$legacy-support-for-ie7
20
- #{'$ie8-'}$legacy-support-for-ie8;
21
- }
22
-
23
- // Capture the current exerimental support settings
24
- @function capture-experimental-matrix() {
25
- @return $experimental-support-for-mozilla
26
- $experimental-support-for-webkit
27
- $experimental-support-for-microsoft
28
- $experimental-support-for-opera
29
- $experimental-support-for-khtml;
30
- }
31
-
32
- // Capture the current legacy-ie support settings
33
- @function capture-legacy-ie-matrix() {
34
- @return $legacy-support-for-ie6
35
- $legacy-support-for-ie7
36
- $legacy-support-for-ie8;
37
- }
38
-
39
- // Capture and store support
40
- $experimental-matrix: capture-experimental-matrix();
41
- $legacy-ie-matrix: capture-legacy-ie-matrix();
42
-
43
- @mixin capture-experimental-matrix {
44
- $experimental-matrix: capture-experimental-matrix();
45
- }
46
-
47
- @mixin capture-legacy-ie-matrix {
48
- $legacy-ie-matrix: capture-legacy-ie-matrix();
49
- }
50
-
51
- @mixin capture-support-matrix {
52
- @include capture-experimental-matrix;
53
- @include capture-legacy-ie-matrix;
54
- }
55
-
56
- // Change the experimental-support settings in specific contexts.
57
- @mixin set-experimental-support(
58
- $moz : false,
59
- $webkit : false,
60
- $ms : false,
61
- $o : false,
62
- $khtml : false
63
- ) {
64
- $experimental-support-for-mozilla : $moz;
65
- $experimental-support-for-webkit : $webkit;
66
- $experimental-support-for-microsoft : $ms;
67
- $experimental-support-for-opera : $o;
68
- $experimental-support-for-khtml : $khtml;
69
- }
70
-
71
- @mixin capture-and-set-experimental(
72
- $moz : false,
73
- $webkit : false,
74
- $ms : false,
75
- $o : false,
76
- $khtml : false
77
- ) {
78
- @include capture-experimental-matrix;
79
- @include set-experimental-support($moz, $webkit, $ms, $o, $khtml);
80
- }
81
-
82
- @mixin capture-and-adjust-experimental(
83
- $moz : $experimental-support-for-mozilla,
84
- $webkit : $experimental-support-for-webkit,
85
- $ms : $experimental-support-for-microsoft,
86
- $o : $experimental-support-for-opera,
87
- $khtml : $experimental-support-for-khtml
88
- ) {
89
- @include capture-experimental-matrix;
90
- @include set-experimental-support($moz, $webkit, $ms, $o, $khtml);
91
- }
92
-
93
- // Change the legacy-support-for-ie* settings in specific contexts.
94
- @mixin set-legacy-ie-support(
95
- $ie6: false,
96
- $ie7: false,
97
- $ie8: false
98
- ) {
99
- $legacy-support-for-ie6: $ie6;
100
- $legacy-support-for-ie7: $ie7;
101
- $legacy-support-for-ie8: $ie8;
102
- }
103
-
104
- @mixin capture-and-set-legacy-ie(
105
- $ie6: false,
106
- $ie7: false,
107
- $ie8: false
108
- ) {
109
- @include capture-legacy-ie-matrix;
110
- @include set-legacy-ie-support($ie6, $ie7, $ie8);
111
- }
112
-
113
- @mixin capture-and-adjust-legacy-ie(
114
- $ie6: $legacy-support-for-ie6,
115
- $ie7: $legacy-support-for-ie7,
116
- $ie8: $legacy-support-for-ie8
117
- ) {
118
- @include capture-and-set-legacy-ie($ie6, $ie7, $ie8);
119
- }
120
-
121
- // Capture current browser support matrix, and set a new matrix of support.
122
- @mixin capture-and-set-support(
123
- $moz : false,
124
- $webkit : false,
125
- $ms : false,
126
- $o : false,
127
- $khtml : false,
128
- $ie6 : false,
129
- $ie7 : false,
130
- $ie8 : false
131
- ) {
132
- // Capture the current state
133
- @include capture-support-matrix;
134
-
135
- // Change support settings
136
- @include set-experimental-support($moz, $webkit, $ms, $o, $khtml);
137
- @include set-legacy-ie-support($ie6, $ie7, $ie8);
138
- }
139
-
140
- // Capture current browser support matrix, and set a new matrix of support.
141
- @mixin capture-and-adjust-support(
142
- $moz : $experimental-support-for-mozilla,
143
- $webkit : $experimental-support-for-webkit,
144
- $ms : $experimental-support-for-microsoft,
145
- $o : $experimental-support-for-opera,
146
- $khtml : $experimental-support-for-khtml,
147
- $ie6 : $legacy-support-for-ie6,
148
- $ie7 : $legacy-support-for-ie7,
149
- $ie8 : $legacy-support-for-ie8
150
- ) {
151
- @include capture-and-set-support($moz, $webkit, $ms, $o, $khtml, $ie6, $ie7, $ie8);
152
- }
153
-
154
-
155
- // This mixin allows you to change the experimental support settings for
156
- // child (@content) styles.
157
- @mixin with-only-support-for(
158
- $moz : false,
159
- $webkit : false,
160
- $ms : false,
161
- $o : false,
162
- $khtml : false,
163
- $ie6 : false,
164
- $ie7 : false,
165
- $ie8 : false
166
- ) {
167
- // Capture current state
168
- $wo-experimental-matrix : capture-experimental-matrix();
169
- $wo-legacy-ie-matrix : capture-legacy-ie-matrix();
170
-
171
- // Set new states
172
- @include set-experimental-support($moz, $webkit, $ms, $o, $khtml);
173
- @include set-legacy-ie-support($ie6, $ie7, $ie8);
174
-
175
- // Apply styles
176
- @content;
177
-
178
- // Return to original support settings
179
- @include set-experimental-support($wo-experimental-matrix...);
180
- @include set-legacy-ie-support($wo-legacy-ie-matrix...);
181
- }
182
-
183
- // This mixin is a shortcut for making slight adjustments to browser support
184
- // for child (@content) styles
185
- @mixin adjust-support-for(
186
- $moz : $experimental-support-for-mozilla,
187
- $webkit : $experimental-support-for-webkit,
188
- $ms : $experimental-support-for-microsoft,
189
- $o : $experimental-support-for-opera,
190
- $khtml : $experimental-support-for-khtml,
191
- $ie6 : $legacy-support-for-ie6,
192
- $ie7 : $legacy-support-for-ie7,
193
- $ie8 : $legacy-support-for-ie8
194
- ) {
195
- @include with-only-support-for($moz, $webkit, $ms, $o, $khtml, $ie6, $ie7, $ie8) {
196
- @content;
197
- }
198
- }
@@ -1,159 +0,0 @@
1
- // @private Default font-size for all browsers
2
- $browser-default-font-size: 16px;
3
-
4
- // Base font size in pixels, if not already defined.
5
- // Should be the same as the font-size of the html element.
6
- $base-font-size: 16px !default;
7
-
8
- // Whether to output fallback values in px when outputting rems.
9
- $rem-with-px-fallback: true !default;
10
-
11
- // Convert any CSS <length> or <percentage> value to any another.
12
- //
13
- // @param $length
14
- // A css <length> or <percentage> value
15
- //
16
- // @param $to-unit
17
- // String matching a css unit keyword, e.g. 'em', '%', etc.
18
- //
19
- // @param $from-context
20
- // When converting from relative units, the absolute length (in px) to
21
- // which $length refers (e.g. for $lengths in em units, would normally be the
22
- // font-size of the current element).
23
- //
24
- // @param $to-context
25
- // For converting to relative units, the absolute length in px to which the
26
- // output value will refer. Defaults to the same as $from-context, since it is
27
- // rarely needed.
28
- @function convert-length(
29
- $length,
30
- $to-unit,
31
- $from-context: $base-font-size,
32
- $to-context: $from-context
33
- ) {
34
-
35
- $from-unit: unit($length);
36
-
37
- // Optimize for cases where `from` and `to` units are accidentally the same.
38
- @if $from-unit == $to-unit { @return $length; }
39
-
40
- // Context values must be in px so we can determine a conversion ratio for
41
- // relative units.
42
- @if unit($from-context) != 'px' { @warn "Paremeter $from-context must resolve to a value in pixel units."; }
43
- @if unit($to-context) != 'px' { @warn "Parameter $to-context must resolve to a value in pixel units."; }
44
-
45
- // Convert input length to pixels
46
- $px-length: $length;
47
-
48
- @if $from-unit != 'px' {
49
- // Convert relative units using the from-context parameter.
50
- @if $from-unit == 'em' { $px-length: $length * $from-context / 1em }
51
- @else if $from-unit == 'rem' { $px-length: $length * $base-font-size / 1rem }
52
- @else if $from-unit == '%' { $px-length: $length * $from-context / 100% }
53
- @else if $from-unit == 'ex' { $px-length: $length * $from-context / 2ex }
54
- // Convert absolute units using Sass' conversion table.
55
- @else if $from-unit == 'in' or
56
- $from-unit == 'mm' or
57
- $from-unit == 'cm' or
58
- $from-unit == 'pt' or
59
- $from-unit == 'pc' { $px-length: 0px + $length }
60
- // Certain units can't be converted.
61
- @else if $from-unit == 'ch' or
62
- $from-unit == 'vw' or
63
- $from-unit == 'vh' or
64
- $from-unit == 'vmin' {
65
- @warn "#{$from-unit} units can't be reliably converted; Returning original value.";
66
- @return $length;
67
- }
68
- @else {
69
- @warn "#{$from-unit} is an unknown length unit. Returning original value.";
70
- @return $length;
71
- }
72
- }
73
-
74
- // Convert length in pixels to the output unit
75
- $output-length: $px-length;
76
- @if $to-unit != 'px' {
77
- // Relative units
78
- @if $to-unit == 'em' { $output-length: $px-length * 1em / $to-context }
79
- @else if $to-unit == 'rem' { $output-length: $px-length * 1rem / $base-font-size }
80
- @else if $to-unit == '%' { $output-length: $px-length * 100% / $to-context }
81
- @else if $to-unit == 'ex' { $output-length: $px-length * 2ex / $to-context }
82
- // Absolute units
83
- @else if $to-unit == 'in' { $output-length: 0in + $px-length }
84
- @else if $to-unit == 'mm' { $output-length: 0mm + $px-length }
85
- @else if $to-unit == 'cm' { $output-length: 0cm + $px-length }
86
- @else if $to-unit == 'pt' { $output-length: 0pt + $px-length }
87
- @else if $to-unit == 'pc' { $output-length: 0pc + $px-length }
88
- // Non-convertible units
89
- @else if $to-unit == 'ch' or
90
- $to-unit == 'vw' or
91
- $to-unit == 'vh' or
92
- $to-unit == 'vmin' {
93
- @warn "#{$to-unit} units can't be reliably converted; Returning original value.";
94
- @return $length;
95
- }
96
- @else {
97
- @warn "#{$to-unit} is an unknown length unit. Returning original value.";
98
- @return $length;
99
- }
100
- }
101
-
102
- @return $output-length;
103
- }
104
-
105
-
106
- // Output a given style rule containing rem values along with an (optional)
107
- // fallback rule for older browsers (with rem values converted to px).
108
- //
109
- // @param $property
110
- // The css property name.
111
- //
112
- // @param $values
113
- // The value (or space-separated list of values) for the property.
114
- //
115
- // @param $use-px-fallback
116
- // [ true | false ]
117
- //
118
- @mixin rem($property, $values, $use-px-fallback: $rem-with-px-fallback) {
119
- // Create a couple of empty lists as output buffers.
120
- $px-values: ();
121
- $rem-values: ();
122
-
123
- // Loop through the $values list
124
- @each $value in $values {
125
- // For each property value, if it's in rem or px, derive both rem and
126
- // px values for it and add those to the end of the appropriate buffer.
127
- // Ensure all pixel values are rounded to the nearest pixel.
128
- @if type-of($value) == number and not unitless($value) and (unit($value) == px or unit($value) == rem) {
129
- @if unit($value) == px {
130
- $px-values: join($px-values, round($value));
131
- $rem-values: join($rem-values, convert-length($value, rem));
132
- }
133
- @else {
134
- $px-values: join($px-values, round(convert-length($value, px)));
135
- $rem-values: join($rem-values, $value);
136
- }
137
- }
138
- @else {
139
- $px-values: join($px-values, $value);
140
- $rem-values: join($rem-values, $value);
141
- }
142
- }
143
-
144
- // Use pixel fallback for browsers that don't understand rem units.
145
- @if $use-px-fallback {
146
- #{$property}: $px-values;
147
- }
148
-
149
- // Use rem values for everyone else (overrides pixel values).
150
- #{$property}: $rem-values;
151
- }
152
-
153
- @mixin if-rem($property, $values, $use-px-fallback: $rem-with-px-fallback) {
154
- $has-rem: false;
155
- @each $value in $values { $has-rem: if(unit($value) == 'rem', true, $has-rem); }
156
- @if $has-rem { @include rem($property, $values, $use-px-fallback); }
157
- @else { #{$property}: $values; }
158
- }
159
-
data/susy.gemspec DELETED
@@ -1,35 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- Gem::Specification.new do |s|
4
- s.name = "susy"
5
- s.version = "1.0.9"
6
-
7
- s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Eric Meyer"]
9
- s.date = "2013-06-19"
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
- s.email = "eric@oddbird.net"
12
- s.extra_rdoc_files = ["CHANGELOG.mkdn", "LICENSE.txt", "README.md", "lib/susy.rb"]
13
- s.files = ["CHANGELOG.mkdn", "LICENSE.txt", "Manifest", "README.md", "Rakefile", "VERSION", "lib/susy.rb", "sass/_susy.scss", "sass/susy/_background.scss", "sass/susy/_functions.scss", "sass/susy/_grid.scss", "sass/susy/_isolation.scss", "sass/susy/_margin.scss", "sass/susy/_media.scss", "sass/susy/_padding.scss", "sass/susy/_settings.scss", "sass/susy/_support.scss", "sass/susy/_units.scss", "susy.gemspec", "templates/project/_base.scss", "templates/project/manifest.rb", "templates/project/screen.scss", "test/config.rb", "test/css/background.css", "test/css/bleed.css", "test/css/functions.css", "test/css/grid.css", "test/css/isolation.css", "test/css/margin.css", "test/css/media.css", "test/css/padding.css", "test/scss/background.scss", "test/scss/bleed.scss", "test/scss/functions.scss", "test/scss/grid.scss", "test/scss/isolation.scss", "test/scss/margin.scss", "test/scss/media.scss", "test/scss/padding.scss"]
14
- s.homepage = "http://susy.oddbird.net/"
15
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Susy", "--main", "README.md"]
16
- s.require_paths = ["lib"]
17
- s.rubyforge_project = "susy"
18
- s.rubygems_version = "1.8.24"
19
- s.summary = "Responsive grids for Compass."
20
-
21
- if s.respond_to? :specification_version then
22
- s.specification_version = 3
23
-
24
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
25
- s.add_runtime_dependency(%q<compass>, [">= 0.12.2"])
26
- s.add_runtime_dependency(%q<sass>, [">= 3.2.0"])
27
- else
28
- s.add_dependency(%q<compass>, [">= 0.12.2"])
29
- s.add_dependency(%q<sass>, [">= 3.2.0"])
30
- end
31
- else
32
- s.add_dependency(%q<compass>, [">= 0.12.2"])
33
- s.add_dependency(%q<sass>, [">= 3.2.0"])
34
- end
35
- end