susy 2.0.0.alpha.1 → 2.0.0.alpha.2

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.
Files changed (67) hide show
  1. data/lib/susy.rb +0 -1
  2. data/sass/_susy.scss +3 -54
  3. data/sass/susy/_core.scss +6 -0
  4. data/sass/susy/_helpers.scss +5 -13
  5. data/sass/susy/_math.scss +5 -2
  6. data/sass/susy/_settings.scss +52 -0
  7. data/sass/susy/api/_float.scss +6 -71
  8. data/sass/susy/api/_shared.scss +7 -0
  9. data/sass/susy/api/float/_container.scss +12 -0
  10. data/sass/susy/api/float/_end.scss +21 -0
  11. data/sass/susy/api/float/_isolate.scss +14 -0
  12. data/sass/susy/api/float/_span.scss +23 -0
  13. data/sass/susy/api/shared/_container.scss +22 -0
  14. data/sass/susy/api/shared/_grid-background.scss +20 -0
  15. data/sass/susy/api/shared/_margins.scss +15 -0
  16. data/sass/susy/api/shared/_padding.scss +15 -0
  17. data/sass/susy/helpers/_direction.scss +28 -0
  18. data/sass/susy/helpers/_nth.scss +15 -0
  19. data/sass/susy/helpers/_sass-lists.scss +45 -26
  20. data/sass/susy/language/_shared.scss +6 -0
  21. data/sass/susy/language/_susy.scss +16 -0
  22. data/sass/susy/language/_susy1.scss +9 -0
  23. data/sass/susy/language/shared/_context.scss +35 -0
  24. data/sass/susy/language/shared/_settings.scss +216 -0
  25. data/sass/susy/language/susy/_background.scss +132 -0
  26. data/sass/susy/language/susy/_container.scss +100 -0
  27. data/sass/susy/language/susy/_functions.scss +58 -0
  28. data/sass/susy/language/susy/_gallery.scss +94 -0
  29. data/sass/susy/language/susy/_isolate.scss +51 -0
  30. data/sass/susy/language/susy/_math.scss +153 -0
  31. data/sass/susy/language/susy/_rows.scss +78 -0
  32. data/sass/susy/language/susy/_span.scss +204 -0
  33. data/sass/susy/language/susy1/_settings.scss +60 -0
  34. data/sass/susy/math/_columns.scss +79 -55
  35. data/sass/susy/math/_container.scss +45 -0
  36. data/sass/susy/math/_location.scss +47 -0
  37. data/templates/project/README.md +36 -11
  38. data/templates/project/_base.scss +1 -1
  39. data/templates/project/manifest.rb +0 -3
  40. data/templates/project/screen.scss +1 -1
  41. metadata +33 -45
  42. data/sass/README.md +0 -33
  43. data/sass/susy/_api.scss +0 -39
  44. data/sass/susy/_grids.scss +0 -2
  45. data/sass/susy/_gutters.scss +0 -2
  46. data/sass/susy/_language.scss +0 -3
  47. data/sass/susy/api/_isolation.scss +0 -16
  48. data/sass/susy/grids/_add.scss +0 -10
  49. data/sass/susy/grids/_find.scss +0 -10
  50. data/sass/susy/gutters/_add.scss +0 -10
  51. data/sass/susy/gutters/_find.scss +0 -10
  52. data/sass/susy/helpers/_background-grid.scss +0 -65
  53. data/sass/susy/helpers/_box-sizing.scss +0 -25
  54. data/sass/susy/helpers/_clearfix.scss +0 -51
  55. data/sass/susy/helpers/_columns.scss +0 -15
  56. data/sass/susy/helpers/_find.scss +0 -63
  57. data/sass/susy/helpers/_span-shared.scss +0 -9
  58. data/sass/susy/language/_parse-add.scss +0 -19
  59. data/sass/susy/language/_parse-list.scss +0 -53
  60. data/sass/susy/language/_span.scss +0 -20
  61. data/sass/susy/math/_context.scss +0 -3
  62. data/sass/susy/math/_gutters.scss +0 -11
  63. data/templates/box-sizing/behaviors/box-sizing/boxsizing.htc +0 -399
  64. data/templates/box-sizing/behaviors/box-sizing/boxsizing.php +0 -23
  65. data/templates/box-sizing/manifest.rb +0 -4
  66. data/templates/project/behaviors/box-sizing/boxsizing.htc +0 -399
  67. data/templates/project/behaviors/box-sizing/boxsizing.php +0 -23
@@ -1,5 +1,4 @@
1
1
  require 'compass'
2
- require 'breakpoint'
3
2
  Compass::Frameworks.register('susy',
4
3
  :stylesheets_directory => File.join(File.dirname(__FILE__), '..', 'sass'),
5
4
  :templates_directory => File.join(File.dirname(__FILE__), '..', 'templates'))
@@ -1,55 +1,4 @@
1
- //////////////////////////////
2
- // Import Required Extensions
3
- //////////////////////////////
4
- @import "breakpoint";
1
+ // Susy partials
2
+ // =============
5
3
 
6
- //////////////////////////////
7
- // Default Variables
8
- //////////////////////////////
9
-
10
- // The grids being used
11
- $grids: () !default;
12
-
13
- // The gutters of the inner columns of the grid
14
- $gutters: () !default;
15
-
16
- // Specifies whether or not you're building mobile-first grids. Defaults to true
17
- // $mobile-first: true;
18
-
19
- // Default output style.
20
- $output: 'float' !default;
21
-
22
- // Whether or not to include border-box or clearfix with all spans
23
- $include-border-box: false !default;
24
- $include-clearfix: false !default;
25
- $include-clear: true !default;
26
-
27
- //////////////////////////////
28
- // Import General Helpers
29
- //////////////////////////////
30
- @import "susy/helpers";
31
-
32
- //////////////////////////////
33
- // Import Language Helpers
34
- //////////////////////////////
35
- @import "susy/language";
36
-
37
- //////////////////////////////
38
- // Import Math
39
- //////////////////////////////
40
- @import "susy/math";
41
-
42
- //////////////////////////////
43
- // Import Grid Helpers
44
- //////////////////////////////
45
- @import "susy/grids";
46
-
47
- //////////////////////////////
48
- // Import Gutters Helpers
49
- //////////////////////////////
50
- @import "susy/gutters";
51
-
52
- //////////////////////////////
53
- // Import APIs
54
- //////////////////////////////
55
- @import "susy/api";
4
+ @import "susy/language/susy";
@@ -0,0 +1,6 @@
1
+ // The Susy Core
2
+ // =============
3
+
4
+ @import "settings";
5
+ @import "helpers";
6
+ @import "math";
@@ -1,14 +1,6 @@
1
- //////////////////////////////
2
- // Code Helpers
3
- //////////////////////////////
4
- @import "helpers/find";
5
- @import "helpers/sass-lists";
6
- @import "helpers/columns";
7
- @import "helpers/clearfix";
8
- @import "helpers/box-sizing";
9
- @import "helpers/span-shared";
1
+ // Helper partials
2
+ // ===============
10
3
 
11
- //////////////////////////////
12
- // UI Helpers
13
- //////////////////////////////
14
- @import "helpers/background-grid";
4
+ @import "helpers/sass-lists";
5
+ @import "helpers/direction";
6
+ @import "helpers/nth";
@@ -1,3 +1,6 @@
1
+ // Math partials
2
+ // =============
3
+
4
+ @import "math/container";
1
5
  @import "math/columns";
2
- @import "math/gutters";
3
- @import "math/context";
6
+ @import "math/location";
@@ -0,0 +1,52 @@
1
+ // Settings
2
+ // ========
3
+
4
+ // Grid basics
5
+ // -----------
6
+
7
+ $columns : 4 !default;
8
+ $gutters : .25 !default;
9
+
10
+
11
+ // Grid widths [optional]
12
+ // ----------------------
13
+ //
14
+ // - Set EITHER $column-width OR $container
15
+ // - We can determine one from the other, but we can't resolve conflicts
16
+
17
+ $column-width : false !default;
18
+ $container : false !default;
19
+
20
+
21
+ // Output
22
+ // ------
23
+
24
+ // global toggle for static/fluid output
25
+ $static : false !default;
26
+
27
+ // global toggle for isolate/float output
28
+ $isolate : false !default;
29
+
30
+ // global toggle for ltr/rtl output
31
+ $flow : ltr !default;
32
+
33
+ // global toggle for box-sizing
34
+ $box-sizing : false !default;
35
+
36
+ // Defaults
37
+ // --------
38
+
39
+ // Default container justification
40
+ // - left | center | right
41
+ $container-position : center !default;
42
+
43
+ // Default gutter handling
44
+ // - before | after | split
45
+ $gutter-placement : after;
46
+
47
+
48
+ // Debug
49
+ // -----
50
+
51
+ // global toggle to show/hide grids
52
+ $show-grids : show !default;
@@ -1,72 +1,7 @@
1
- @mixin output-float($span, $location, $columns, $gutter) {
1
+ // Float api partials
2
+ // ==================
2
3
 
3
- $location-holder: $location;
4
-
5
- @if type-of($location) == string {
6
- @if end-row($span, $location, $columns) {
7
- $grid-length: length(find-grid($columns));
8
- $location-holder: $grid-length - $span;
9
- }
10
- @else {
11
- $location-holder: 1;
12
- }
13
- }
14
-
15
- $gutter: find-gutter($gutter);
16
-
17
- width: column-span($span, $location-holder, $columns, $gutter);
18
- clear: right;
19
- // @include clearfix;
20
-
21
- @if end-row($span, $location, $columns) {
22
- float: right;
23
- }
24
- @else {
25
- float: left;
26
- margin-right: gutter-span($gutter, $columns);
27
- }
28
-
29
- @include span-shared;
30
- }
31
-
32
- @mixin push-float($span, $location, $columns: false, $gutter: false) {
33
-
34
- @if type-of($location) == string {
35
- $location: 1;
36
- }
37
-
38
- // Find the columns and gutters
39
- $columns: find-grid($columns);
40
- $gutter: find-gutter($gutter);
41
-
42
- // Combine the columns and gutters
43
- $gutter: column-span($span, $location, $columns, $gutter) + gutter-span($gutter, $columns);
44
-
45
- margin-left: $gutter;
46
- }
47
-
48
- @mixin pull-float($span, $location, $columns: false, $gutter: false) {
49
-
50
- @if type-of($location) == string {
51
- $location: 1;
52
- }
53
-
54
- // Find the columns and gutters
55
- $columns: find-grid($columns);
56
- $gutter: find-gutter($gutter);
57
-
58
- // Combine the columns and gutters
59
- $gutter: (column-span($span, $location, $columns, $gutter) + gutter-span($gutter, $columns)) * -1;
60
-
61
- margin-left: $gutter;
62
- }
63
-
64
- @mixin isolate-float($span, $location, $columns: false, $gutter: false) {
65
-
66
- // Find the columns and gutters
67
- $columns: find-grid($columns);
68
- $gutter: find-gutter($gutter);
69
-
70
- @include push-float($span, $location, $columns, $gutter);
71
- margin-right: -100%;
72
- }
4
+ @import "float/container";
5
+ @import "float/span";
6
+ @import "float/end";
7
+ @import "float/isolate";
@@ -0,0 +1,7 @@
1
+ // Shared partials
2
+ // ===============
3
+
4
+ @import "shared/grid-background";
5
+ @import "shared/container";
6
+ @import "shared/margins";
7
+ @import "shared/padding";
@@ -0,0 +1,12 @@
1
+ // Float container
2
+ // ===============
3
+
4
+ // Output a know float container
5
+ @mixin float-container(
6
+ $width : $container,
7
+ $justify : $container-position,
8
+ $show-grids : $show-grids
9
+ ) {
10
+ @include pie-clearfix;
11
+ @include container-output($width, $justify, $show-grids);
12
+ }
@@ -0,0 +1,21 @@
1
+ // Float ends
2
+ // ==========
3
+
4
+ // Last Unit
5
+ @mixin float-last(
6
+ $flow: $flow
7
+ ) {
8
+ $to: to($flow);
9
+
10
+ float: $to;
11
+ margin-#{$to}: 0;
12
+ }
13
+
14
+ // Last Unit
15
+ @mixin float-first(
16
+ $flow: $flow
17
+ ) {
18
+ $from: from($flow);
19
+
20
+ margin-#{$from}: 0;
21
+ }
@@ -0,0 +1,14 @@
1
+ // Float Isolation
2
+ // ===============
3
+
4
+ // Isolation Override
5
+ @mixin isolate-output(
6
+ $push,
7
+ $flow : $flow
8
+ ) {
9
+ $to : to($flow);
10
+ $from : from($flow);
11
+
12
+ margin-#{$from}: $push;
13
+ margin-#{$to}: -100%;
14
+ }
@@ -0,0 +1,23 @@
1
+ // Float span
2
+ // ==========
3
+
4
+ // Output span
5
+ @mixin float-span-output(
6
+ $width,
7
+ $float : from($flow),
8
+ $margin-before : null,
9
+ $margin-after : null,
10
+ $padding-before : null,
11
+ $padding-after : null,
12
+ $flow : $flow
13
+ ) {
14
+ $to : to($flow);
15
+ $from : from($flow);
16
+
17
+ width: $width;
18
+ float: $float;
19
+ margin-#{$from}: $margin-before;
20
+ margin-#{$to}: $margin-after;
21
+ padding-#{$from}: $padding-before;
22
+ padding-#{$to}: $padding-after;
23
+ }
@@ -0,0 +1,22 @@
1
+ // Shared container output
2
+ // =======================
3
+
4
+ // Output container styles
5
+ @mixin container-output(
6
+ $width : $container,
7
+ $justify : $container-position,
8
+ $show-grids : $show-grids
9
+ ) {
10
+ $position : parse-container-position($justify);
11
+ $property : if($static, width, max-width);
12
+ $left : nth($position,1);
13
+ $right : nth($position,2);
14
+
15
+ @if not $width {
16
+ $width: 100%;
17
+ }
18
+
19
+ #{$property}: $width;
20
+ margin-left: $left;
21
+ margin-right: $right;
22
+ }
@@ -0,0 +1,20 @@
1
+ // -------------------------
2
+ // Grid Overlay & Background
3
+ //
4
+ // Note: Sub-pixel rounding can lead to several pixels of variation between browsers.
5
+
6
+ @import "compass/css3";
7
+
8
+ // Grid Background Output
9
+ // ----------------------
10
+
11
+ @mixin grid-background-output (
12
+ $stops,
13
+ $flow : $flow
14
+ ) {
15
+ $to : to($flow);
16
+ $from : from($flow);
17
+
18
+ @include background(linear-gradient($from, $stops...));
19
+ background: linear-gradient(to $to, $stops...);
20
+ }
@@ -0,0 +1,15 @@
1
+ // Margins
2
+ // =======
3
+
4
+ // Add margin before or after an element
5
+ @mixin margin-output(
6
+ $before,
7
+ $after : $before,
8
+ $flow : $flow
9
+ ) {
10
+ $to: to($flow);
11
+ $from: from($flow);
12
+
13
+ margin-#{$from}: $before;
14
+ margin-#{$to}: $after;
15
+ }
@@ -0,0 +1,15 @@
1
+ // Padding
2
+ // =======
3
+
4
+ // Add padding before or after an element
5
+ @mixin padding-output(
6
+ $before,
7
+ $after : $before,
8
+ $flow : $flow
9
+ ) {
10
+ $to: to($flow);
11
+ $from: from($flow);
12
+
13
+ padding-#{$from}: $before;
14
+ padding-#{$to}: $after;
15
+ }
@@ -0,0 +1,28 @@
1
+ // Direction helpers
2
+ // =================
3
+
4
+ // Return the 'from' or 'to' direction of a ltr or rtl flow.
5
+ @function get-direction(
6
+ $flow: $flow,
7
+ $key: from
8
+ ) {
9
+ $from: if($flow == rtl, right, left);
10
+ $to: if($flow == rtl, left, right);
11
+
12
+ @if $key == from { @return $from; }
13
+ @else if $key == to { @return $to; }
14
+ }
15
+
16
+ // Return the 'to' direction of a flow
17
+ @function to(
18
+ $flow: $flow
19
+ ) {
20
+ @return get-direction($flow,to);
21
+ }
22
+
23
+ // Return the 'from' direction of a flow
24
+ @function from(
25
+ $flow: $flow
26
+ ) {
27
+ @return get-direction($flow,from);
28
+ }
@@ -0,0 +1,15 @@
1
+ // Nth- helpers
2
+ // ============
3
+
4
+ // Format various nth-selectors
5
+ @function format-nth(
6
+ $n : last,
7
+ $selector : child
8
+ ) {
9
+ @if ($n == 'last') or ($n =='first') or ($n =='only') {
10
+ $selector: '#{$n}-#{$selector}';
11
+ } @else {
12
+ $selector: 'nth-#{$selector}(#{$n})';
13
+ }
14
+ @return $selector;
15
+ }