susy 2.1.3 → 2.2.0.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/docs/changelog.rst +24 -0
- data/sass/_su.scss +4 -0
- data/sass/_susy.scss +1 -1
- data/sass/_susyone.scss +1 -1
- data/sass/susy/{math/_su.scss → _su.scss} +1 -1
- data/sass/susy/language/_susy.scss +1 -1
- data/sass/susy/language/susy/_background.scss +5 -5
- data/sass/susy/language/susy/_bleed.scss +3 -3
- data/sass/susy/language/susy/_box-sizing.scss +18 -5
- data/sass/susy/language/susy/_container.scss +2 -2
- data/sass/susy/language/susy/_gallery.scss +11 -11
- data/sass/susy/language/susy/_grids.scss +5 -5
- data/sass/susy/language/susy/_gutters.scss +1 -1
- data/sass/susy/language/susy/_isolate.scss +4 -3
- data/sass/susy/language/susy/_rows.scss +4 -3
- data/sass/susy/language/susy/_settings.scss +3 -5
- data/sass/susy/language/susy/_span.scss +8 -8
- data/sass/susy/language/susy/_validation.scss +1 -1
- data/sass/susy/language/susyone/_functions.scss +8 -8
- data/sass/susy/language/susyone/_media.scss +3 -3
- data/sass/susy/output/shared/_inspect.scss +6 -3
- data/sass/susy/output/support/_prefix.scss +1 -1
- data/sass/susy/output/support/_support.scss +2 -1
- data/sass/susy/{math/su → su}/_grid.scss +9 -45
- data/sass/susy/{math/su → su}/_settings.scss +5 -1
- data/sass/susy/{math/su/_maps.scss → su/_utilities.scss} +3 -2
- data/sass/susy/{math/su → su}/_validation.scss +2 -2
- metadata +9 -9
- data/sass/susy/_math.scss +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3d0591f512412a10d2cc0d8a9bb0daf2b2161fa
|
4
|
+
data.tar.gz: adfd26326c13e5af97efbf4386078be3739717d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fb29b9a8c512387fc3a8192d566c9f56a28255a0efe52cb644045766f9c1accfebcccecb821510088ea5d62b133496c2531d40e076a981ade61af257000d43e
|
7
|
+
data.tar.gz: 5518f798611cb3a6d9dbdde2b307cd61fdaacdb35a944c1e5766b4b7760765557d44bf6c36aae7cdb0f2371820760700719359f126ee93e9b481b0c2f440cf94
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1
|
1
|
+
2.2.0.beta.1
|
data/docs/changelog.rst
CHANGED
@@ -1,6 +1,30 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
+
2.2.0 - UNRELEASED
|
5
|
+
------------------
|
6
|
+
|
7
|
+
- Update ``global-box-sizing`` and the legacy ``border-box-sizing``
|
8
|
+
mixins to optionally take another argument, ``$inherit``. This new
|
9
|
+
argument is a boolean value that defaults to ``false``, meaning the
|
10
|
+
behavior of these mixins will not change by default. The default
|
11
|
+
behavior sets all elements to use the specified ``box-sizing``,
|
12
|
+
which can only be changed explicitly on a per-element basis. By passing
|
13
|
+
in ``$inherit`` as ``true``, the ``box-sizing`` is set on the
|
14
|
+
``html`` element, and all other elements inherit this property. This
|
15
|
+
means that the ``box-sizing`` can be changed at the component level
|
16
|
+
and all nested elements will inherit this change. This cascading
|
17
|
+
effect can be prevented by explicitly setting ``box-sizing`` on the
|
18
|
+
exceptions within the nested context.
|
19
|
+
- Add ``su`` import at root level.
|
20
|
+
- Both ``su`` and ``susy`` work with the latest LibSass master branch (3.0.2+).
|
21
|
+
There are a few exceptions:
|
22
|
+
|
23
|
+
+ The ``susysone`` syntax
|
24
|
+
+ ``overlay`` grid output
|
25
|
+
+ The ``inherit`` option for ``global-box-sizing`` & ``border-box-sizing``
|
26
|
+
|
27
|
+
|
4
28
|
2.1.3 - Jul 16 2014
|
5
29
|
-------------------
|
6
30
|
|
data/sass/_su.scss
ADDED
data/sass/_susy.scss
CHANGED
data/sass/_susyone.scss
CHANGED
@@ -44,7 +44,7 @@ $susy-overlay-grid-head-exists: false;
|
|
44
44
|
$_image: ();
|
45
45
|
@each $name, $layer in map-get($_output, image) {
|
46
46
|
$_direction: if($name == baseline, to bottom, to to($_flow));
|
47
|
-
$_image: append($_image, linear-gradient($_direction, $layer
|
47
|
+
$_image: append($_image, linear-gradient($_direction, $layer), comma);
|
48
48
|
}
|
49
49
|
$_output: map-merge($_output, (image: $_image));
|
50
50
|
|
@@ -61,7 +61,7 @@ $susy-overlay-grid-head-exists: false;
|
|
61
61
|
@mixin overlay-grid (
|
62
62
|
$grid: $susy
|
63
63
|
) {
|
64
|
-
@if not
|
64
|
+
@if not($susy-overlay-grid-head-exists) {
|
65
65
|
@at-root head { @include overlay-head; }
|
66
66
|
@at-root head:before { @include overlay-trigger; }
|
67
67
|
@at-root head:hover { @include overlay-trigger-hover; }
|
@@ -336,18 +336,18 @@ $susy-overlay-grid-head-exists: false;
|
|
336
336
|
$_sym: is-symmetrical($_columns);
|
337
337
|
$_return: if($_sym, get-background-sym($grid), get-background-asym($grid));
|
338
338
|
$_return: map-merge($_return, (clip: content-box));
|
339
|
-
} @else if not
|
339
|
+
} @else if not($_line-height) {
|
340
340
|
@warn 'Please provide $base-line-height in order to see baseline grids.';
|
341
341
|
}
|
342
342
|
|
343
343
|
@if $_line-height {
|
344
344
|
@if $_show != show-columns {
|
345
345
|
$_color: variable-exists(grid-background-baseline-color);
|
346
|
-
$_color: if($_color, $grid-background-baseline-color,
|
346
|
+
$_color: if($_color, $grid-background-baseline-color, #000);
|
347
347
|
|
348
348
|
$_image: map-get($_return, image);
|
349
349
|
$_size: map-get($_return, size);
|
350
|
-
$_baseline: (baseline: ($_color 1px,
|
350
|
+
$_baseline: (baseline: ($_color 1px, transparent 1px));
|
351
351
|
$_baseline-size: 100% $_line-height;
|
352
352
|
|
353
353
|
$_return: map-merge($_return, (
|
@@ -14,7 +14,7 @@
|
|
14
14
|
@if susy-get(global-box-sizing) != content-box {
|
15
15
|
$output: map-merge((box-sizing: content-box), $output);
|
16
16
|
}
|
17
|
-
|
17
|
+
|
18
18
|
@include susy-inspect(bleed, $inspect);
|
19
19
|
@include output($output);
|
20
20
|
}
|
@@ -168,7 +168,7 @@
|
|
168
168
|
$four: if(length(map-keys($map)) == 4, true, false);
|
169
169
|
$null: if(index(map-values($map), null), true, false);
|
170
170
|
|
171
|
-
@if $four and not
|
171
|
+
@if $four and not($null) {
|
172
172
|
$top: map-get($map, '#{$name}-top');
|
173
173
|
$right: map-get($map, '#{$name}-right');
|
174
174
|
$bottom: map-get($map, '#{$name}-bottom');
|
@@ -180,7 +180,7 @@
|
|
180
180
|
|
181
181
|
$new: if($all, $all, null);
|
182
182
|
|
183
|
-
@if not
|
183
|
+
@if not($new) {
|
184
184
|
@if $tb and $rl {
|
185
185
|
$new: $tb $rl;
|
186
186
|
} @else if $rl {
|
@@ -5,21 +5,34 @@
|
|
5
5
|
// -----------------
|
6
6
|
// Set a box model globally on all elements.
|
7
7
|
// - [$box]: border-box | content-box
|
8
|
+
// - [$inherit]: true | false
|
8
9
|
@mixin global-box-sizing(
|
9
|
-
$box: susy-get(global-box-sizing)
|
10
|
+
$box: susy-get(global-box-sizing),
|
11
|
+
$inherit: false
|
10
12
|
) {
|
11
|
-
|
13
|
+
$inspect: $box;
|
14
|
+
|
15
|
+
@if $inherit {
|
16
|
+
@at-root {
|
17
|
+
html { @include output((box-sizing: $box)); }
|
18
|
+
*, *:before, *:after { box-sizing: inherit; }
|
19
|
+
}
|
20
|
+
} @else {
|
21
|
+
*, *:before, *:after { @include output((box-sizing: $box)); }
|
22
|
+
}
|
12
23
|
|
13
24
|
@include susy-inspect(global-box-sizing, $inspect);
|
14
|
-
*, *:before, *:after { @include output((box-sizing: $box)); }
|
15
25
|
@include update-box-model($box);
|
16
26
|
}
|
17
27
|
|
18
28
|
// Border Box Sizing
|
19
29
|
// -----------------
|
20
30
|
// A legacy shortcut...
|
21
|
-
|
22
|
-
|
31
|
+
// - [$inherit]: true | false
|
32
|
+
@mixin border-box-sizing(
|
33
|
+
$inherit: false
|
34
|
+
) {
|
35
|
+
@include global-box-sizing(border-box, $inherit);
|
23
36
|
}
|
24
37
|
|
25
38
|
// Update Box Model
|
@@ -49,7 +49,7 @@
|
|
49
49
|
$_column-width : susy-get(column-width, $layout);
|
50
50
|
$_math : susy-get(math, $layout);
|
51
51
|
|
52
|
-
@if not
|
52
|
+
@if not($_width) or $_width == auto {
|
53
53
|
@if valid-column-math($_math, $_column-width) {
|
54
54
|
$_columns : susy-get(columns, $layout);
|
55
55
|
$_gutters : susy-get(gutters, $layout);
|
@@ -72,7 +72,7 @@
|
|
72
72
|
) {
|
73
73
|
$_return: if($justify == left, 0, auto) if($justify == right, 0, auto);
|
74
74
|
|
75
|
-
@if not
|
75
|
+
@if not(index(left right center, $justify)) {
|
76
76
|
$_return: nth($justify, 1);
|
77
77
|
$_return: $_return if(length($justify) > 1, nth($justify, 2), $_return);
|
78
78
|
}
|
@@ -27,18 +27,18 @@
|
|
27
27
|
$output: (
|
28
28
|
width : null,
|
29
29
|
float : from,
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
margin-before : null,
|
31
|
+
margin-after : null,
|
32
|
+
padding-before : null,
|
33
|
+
padding-after : null,
|
34
34
|
flow : $flow,
|
35
35
|
);
|
36
36
|
|
37
37
|
@if $inside {
|
38
38
|
$gutters: get-gutters($span);
|
39
39
|
$output: map-merge($output, (
|
40
|
-
|
41
|
-
|
40
|
+
padding-before: map-get($gutters, before),
|
41
|
+
padding-after: map-get($gutters, after),
|
42
42
|
));
|
43
43
|
}
|
44
44
|
|
@@ -52,7 +52,7 @@
|
|
52
52
|
@include susy-inspect(gallery, $inspect);
|
53
53
|
|
54
54
|
// Collective Output
|
55
|
-
@if $box == border-box or ($inside and not
|
55
|
+
@if $box == border-box or ($inside and not($box) and not($global-box)) {
|
56
56
|
@include output((box-sizing: border-box));
|
57
57
|
} @else if $box == content-box {
|
58
58
|
@include output((box-sizing: content-box));
|
@@ -68,10 +68,10 @@
|
|
68
68
|
$output: (
|
69
69
|
width : if($symmetrical, null, get-span-width($span)),
|
70
70
|
float : null,
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
71
|
+
margin-before : get-isolation($span),
|
72
|
+
margin-after : -100%,
|
73
|
+
padding-before : null,
|
74
|
+
padding-after : null,
|
75
75
|
flow : $flow,
|
76
76
|
);
|
77
77
|
|
@@ -11,8 +11,8 @@
|
|
11
11
|
$layout,
|
12
12
|
$clean: false
|
13
13
|
) {
|
14
|
-
$inspect: $layout;
|
15
|
-
$susy: _get-layout($layout, $clean) !global;
|
14
|
+
$inspect : $layout;
|
15
|
+
$susy : _get-layout($layout, $clean) !global;
|
16
16
|
|
17
17
|
@include susy-inspect(layout, $inspect);
|
18
18
|
}
|
@@ -27,9 +27,9 @@
|
|
27
27
|
$layout,
|
28
28
|
$clean: false
|
29
29
|
) {
|
30
|
-
$inspect: $layout;
|
31
|
-
$old: $susy;
|
32
|
-
$susy: _get-layout($layout, $clean) !global;
|
30
|
+
$inspect : $layout;
|
31
|
+
$old : $susy;
|
32
|
+
$susy : _get-layout($layout, $clean) !global;
|
33
33
|
|
34
34
|
@include susy-inspect(with-layout, $inspect);
|
35
35
|
|
@@ -69,7 +69,7 @@
|
|
69
69
|
$_gutters : susy-get(gutters, $context);
|
70
70
|
$_gutter : susy-get(gutter-override, $context);
|
71
71
|
|
72
|
-
@if $_gutters and ($_gutters > 0) and not
|
72
|
+
@if $_gutters and ($_gutters > 0) and not($_gutter) {
|
73
73
|
$_column-width: susy-get(column-width, $context);
|
74
74
|
$_math: gutter-math($context);
|
75
75
|
@if $_math == static {
|
@@ -10,13 +10,14 @@
|
|
10
10
|
$isolate: 1
|
11
11
|
) {
|
12
12
|
$inspect: $isolate;
|
13
|
+
|
13
14
|
$output: (
|
14
15
|
push: isolate($isolate),
|
15
16
|
flow: susy-get(flow, $isolate),
|
16
17
|
);
|
17
18
|
|
18
|
-
@include isolate-output($output...);
|
19
19
|
@include susy-inspect(isolate, $inspect);
|
20
|
+
@include isolate-output($output...);
|
20
21
|
}
|
21
22
|
|
22
23
|
|
@@ -30,7 +31,7 @@
|
|
30
31
|
$isolate: parse-span($isolate);
|
31
32
|
$isolation: susy-get(span, $isolate);
|
32
33
|
|
33
|
-
@if $isolation and not
|
34
|
+
@if $isolation and not(get-location($isolate)) {
|
34
35
|
$new: (
|
35
36
|
span: null,
|
36
37
|
location: $isolation,
|
@@ -53,7 +54,7 @@
|
|
53
54
|
$columns : susy-get(columns, $input);
|
54
55
|
$width : null;
|
55
56
|
|
56
|
-
@if type-of($location) == number and not
|
57
|
+
@if type-of($location) == number and not(unitless($location)) {
|
57
58
|
$width: $location;
|
58
59
|
} @else if $location {
|
59
60
|
$push: $location - 1;
|
@@ -40,7 +40,7 @@
|
|
40
40
|
$flow : susy-get(flow, $context);
|
41
41
|
|
42
42
|
@include susy-inspect(first, $inspect);
|
43
|
-
@if not
|
43
|
+
@if not(is-split($context)) {
|
44
44
|
@include float-first($flow);
|
45
45
|
}
|
46
46
|
}
|
@@ -65,6 +65,7 @@
|
|
65
65
|
|
66
66
|
$output: (
|
67
67
|
flow: susy-get(flow, $context),
|
68
|
+
last-flow: susy-get(last-flow, $context),
|
68
69
|
margin: if(is-split($context), null, 0),
|
69
70
|
);
|
70
71
|
|
@@ -87,7 +88,7 @@
|
|
87
88
|
$span : parse-span($span);
|
88
89
|
$edge : susy-get(edge, $span);
|
89
90
|
|
90
|
-
@if not
|
91
|
+
@if not($edge) {
|
91
92
|
$count: susy-count(susy-get(columns, $span));
|
92
93
|
$location: susy-get(location, $span);
|
93
94
|
$n: susy-get(span, $span);
|
@@ -125,7 +126,7 @@
|
|
125
126
|
$edge : get-edge($span);
|
126
127
|
$n : susy-get(span, $span);
|
127
128
|
|
128
|
-
@if $edge and not
|
129
|
+
@if $edge and not($location) and type-of($n) == number and unitless($n) {
|
129
130
|
@if $edge == first {
|
130
131
|
$location: 1;
|
131
132
|
} @else if $edge == last {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// Susy Settings
|
2
|
-
//
|
2
|
+
// =============
|
3
3
|
|
4
4
|
// Susy Language Defaults
|
5
5
|
// ----------------------
|
@@ -16,7 +16,6 @@
|
|
16
16
|
color: rgba(#66f, .25),
|
17
17
|
output: background,
|
18
18
|
toggle: top right,
|
19
|
-
inspect: false,
|
20
19
|
),
|
21
20
|
));
|
22
21
|
|
@@ -40,7 +39,6 @@ $susy-keywords: (
|
|
40
39
|
clear: break nobreak,
|
41
40
|
debug image: show hide show-columns show-baseline,
|
42
41
|
debug output: background overlay,
|
43
|
-
debug inspect: inspect,
|
44
42
|
);
|
45
43
|
|
46
44
|
|
@@ -83,7 +81,7 @@ $susy-keywords: (
|
|
83
81
|
$_columns: ();
|
84
82
|
$_gutters: null;
|
85
83
|
|
86
|
-
@if not
|
84
|
+
@if not(unitless(nth(nth($short, 1), 1))) {
|
87
85
|
$_gutters: nth($short, 1);
|
88
86
|
} @else {
|
89
87
|
$_columns: (columns: nth($short, 1));
|
@@ -193,7 +191,7 @@ $susy-keywords: (
|
|
193
191
|
$_gutters: parse-span($short, gutter-override);
|
194
192
|
$_span: susy-get(gutter-override, $_gutters);
|
195
193
|
|
196
|
-
@if $_span and not
|
194
|
+
@if $_span and not(map-get($_gutters, columns)) {
|
197
195
|
$_context: ();
|
198
196
|
$_new: ();
|
199
197
|
|
@@ -65,18 +65,18 @@
|
|
65
65
|
|
66
66
|
// calculate widths
|
67
67
|
$spread: index(map-values($span), spread);
|
68
|
-
$span: if($split-nest and not
|
68
|
+
$span: if($split-nest and not($spread), map-merge($span, (spread: wide)), $span);
|
69
69
|
$width: get-span-width($span);
|
70
70
|
$gutters: get-gutters($span);
|
71
71
|
|
72
72
|
// apply gutters
|
73
73
|
@if is-inside($span) {
|
74
|
-
@if not
|
74
|
+
@if not(susy-get(role, $span)) {
|
75
75
|
$padding-before: map-get($gutters, before);
|
76
76
|
$padding-after: map-get($gutters, after);
|
77
77
|
}
|
78
78
|
} @else {
|
79
|
-
@if not
|
79
|
+
@if not($split-nest) {
|
80
80
|
$margin-before: map-get($gutters, before);
|
81
81
|
$margin-after: map-get($gutters, after);
|
82
82
|
}
|
@@ -94,7 +94,7 @@
|
|
94
94
|
$float: susy-get(last-flow, $span);
|
95
95
|
}
|
96
96
|
|
97
|
-
@if not
|
97
|
+
@if not($is-split) {
|
98
98
|
@if $edge == full or ($edge == first and $pos == before) {
|
99
99
|
$margin-before: 0;
|
100
100
|
}
|
@@ -108,10 +108,10 @@
|
|
108
108
|
@return (
|
109
109
|
width : $width,
|
110
110
|
float : $float,
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
111
|
+
margin-before : $margin-before,
|
112
|
+
margin-after : $margin-after,
|
113
|
+
padding-before : $padding-before,
|
114
|
+
padding-after : $padding-after,
|
115
115
|
flow : susy-get(flow, $span),
|
116
116
|
);
|
117
117
|
}
|
@@ -57,8 +57,8 @@ $rem-with-px-fallback : true !default;
|
|
57
57
|
$columns : $total-columns
|
58
58
|
) {
|
59
59
|
@if round($columns) != $columns {
|
60
|
-
@warn "Susy works best with integer column-spans.
|
61
|
-
For partial-columns, you may need to finesse the math by hand using functions directly.";
|
60
|
+
@warn "Susy works best with integer column-spans." +
|
61
|
+
"For partial-columns, you may need to finesse the math by hand using functions directly.";
|
62
62
|
}
|
63
63
|
@return ($columns * $column-width) + (if($columns >= 1, ceil($columns - 1), 0) * $gutter-width);
|
64
64
|
}
|
@@ -92,7 +92,7 @@ $rem-with-px-fallback : true !default;
|
|
92
92
|
$outerwidth: if($width, $width, columns-width($columns));
|
93
93
|
|
94
94
|
@if $width {
|
95
|
-
@if not
|
95
|
+
@if not($border-box-sizing) { $outerwidth: handle-grid-padding($outerwidth, subtract); }
|
96
96
|
} @else {
|
97
97
|
@if $border-box-sizing { $outerwidth: handle-grid-padding($outerwidth, add); }
|
98
98
|
}
|
@@ -293,7 +293,7 @@ $rem-with-px-fallback : true !default;
|
|
293
293
|
$layout : $val;
|
294
294
|
$has-layout : true;
|
295
295
|
} @else {
|
296
|
-
@if ($has-layout) and (
|
296
|
+
@if ($has-layout) and not($media) {
|
297
297
|
$max: $val;
|
298
298
|
} @else {
|
299
299
|
@if $media {
|
@@ -319,12 +319,12 @@ $rem-with-px-fallback : true !default;
|
|
319
319
|
$min: nth($media,2);
|
320
320
|
}
|
321
321
|
} @else {
|
322
|
-
@warn "Can't compare incompatible units.
|
323
|
-
Using #{$min} for min-width, and #{$max} for max-width";
|
322
|
+
@warn "Can't compare incompatible units." +
|
323
|
+
"Using #{$min} for min-width, and #{$max} for max-width";
|
324
324
|
}
|
325
325
|
@if (length($media) > 2) {
|
326
|
-
@warn "You can only send two lengths: a min-width and an (optional) max-width.
|
327
|
-
You sent #{length($media)}: #{$media}";
|
326
|
+
@warn "You can only send two lengths: a min-width and an (optional) max-width." +
|
327
|
+
"You sent #{length($media)}: #{$media}";
|
328
328
|
}
|
329
329
|
}
|
330
330
|
}
|
@@ -36,7 +36,7 @@
|
|
36
36
|
$max : nth($media-layout,3);
|
37
37
|
$ie : nth($media-layout,4);
|
38
38
|
|
39
|
-
@if (
|
39
|
+
@if not($breakpoint-media-output) and not($breakpoint-ie-output) and not($breakpoint-raw-output) {
|
40
40
|
@warn "Either $breakpoint-media-output, $breakpoint-ie-output, or $breakpoint-raw-output must be true for at-breakpoint to work.";
|
41
41
|
}
|
42
42
|
|
@@ -44,7 +44,7 @@
|
|
44
44
|
@if $min or $layout or $max {
|
45
45
|
|
46
46
|
// If we don't have a layout, we create one based on the min-width.
|
47
|
-
@if not
|
47
|
+
@if not($layout) {
|
48
48
|
$layout: get-layout($min);
|
49
49
|
}
|
50
50
|
|
@@ -60,7 +60,7 @@
|
|
60
60
|
@content;
|
61
61
|
}
|
62
62
|
} @else {
|
63
|
-
@if (
|
63
|
+
@if not($min) and not($max) {
|
64
64
|
// Neither $min nor $max:
|
65
65
|
// We can create a breakpoint based on the number of columns in the layout.
|
66
66
|
$min: fix-ems(container-outer-width($width: false));
|
@@ -1,5 +1,8 @@
|
|
1
|
-
//
|
2
|
-
//
|
1
|
+
// Debugging
|
2
|
+
// =========
|
3
|
+
|
4
|
+
// Susy Inspect
|
5
|
+
// ------------
|
3
6
|
// Output arguments passed to a inspect.
|
4
7
|
// - $mixin : <susy mixin>
|
5
8
|
// - $inspec : <mixin arguments>
|
@@ -16,4 +19,4 @@
|
|
16
19
|
@if $show or susy-get(debug inspect) {
|
17
20
|
-susy-#{$mixin}: inspect($inspect);
|
18
21
|
}
|
19
|
-
}
|
22
|
+
}
|
@@ -13,6 +13,7 @@
|
|
13
13
|
),
|
14
14
|
));
|
15
15
|
|
16
|
+
|
16
17
|
// Susy Support [mixin]
|
17
18
|
// --------------------
|
18
19
|
// Send property-value pairs to the proper support modules.
|
@@ -67,7 +68,7 @@
|
|
67
68
|
@each $_i in $_req {
|
68
69
|
$_pass: call(#{$_type}-exists, $_i);
|
69
70
|
|
70
|
-
@if not
|
71
|
+
@if not($_pass) {
|
71
72
|
$_fail: true;
|
72
73
|
@if $warn {
|
73
74
|
@warn "You requested custom support of #{$feature}, but the #{$_i} #{$_type} is not available.";
|
@@ -7,7 +7,7 @@
|
|
7
7
|
// Returns true if a grid is symmetrical.
|
8
8
|
// - [$columns] : <number> | <list>
|
9
9
|
@function is-symmetrical(
|
10
|
-
$columns:
|
10
|
+
$columns: susy-get(columns)
|
11
11
|
) {
|
12
12
|
$columns: valid-columns($columns);
|
13
13
|
@return if(type-of($columns) == number, $columns, null);
|
@@ -19,19 +19,12 @@
|
|
19
19
|
// Find the number of columns in a given layout
|
20
20
|
// - [$columns] : <number> | <list>
|
21
21
|
@function susy-count(
|
22
|
-
$columns:
|
22
|
+
$columns: susy-get(columns)
|
23
23
|
) {
|
24
24
|
$columns: valid-columns($columns);
|
25
25
|
@return is-symmetrical($columns) or length($columns);
|
26
26
|
}
|
27
27
|
|
28
|
-
@function column-count(
|
29
|
-
$columns: map-get($susy-defaults, columns)
|
30
|
-
) {
|
31
|
-
@warn "[function] column-count() has been renamed susy-count().";
|
32
|
-
@return susy-count($columns);
|
33
|
-
}
|
34
|
-
|
35
28
|
|
36
29
|
// Susy Sum
|
37
30
|
// --------
|
@@ -40,8 +33,8 @@
|
|
40
33
|
// - [$gutters] : <ratio>
|
41
34
|
// - [$spread] : false/narrow | wide | wider
|
42
35
|
@function susy-sum(
|
43
|
-
$columns :
|
44
|
-
$gutters :
|
36
|
+
$columns : susy-get(columns),
|
37
|
+
$gutters : susy-get(gutters),
|
45
38
|
$spread : false
|
46
39
|
) {
|
47
40
|
$columns: valid-columns($columns);
|
@@ -51,7 +44,7 @@
|
|
51
44
|
$gutter-sum: (susy-count($columns) + $spread) * $gutters;
|
52
45
|
$column-sum: is-symmetrical($columns);
|
53
46
|
|
54
|
-
@if not
|
47
|
+
@if not($column-sum) {
|
55
48
|
@each $column in $columns {
|
56
49
|
$column-sum: ($column-sum or 0) + $column;
|
57
50
|
}
|
@@ -60,15 +53,6 @@
|
|
60
53
|
@return $column-sum + $gutter-sum;
|
61
54
|
}
|
62
55
|
|
63
|
-
@function column-sum(
|
64
|
-
$columns : map-get($susy-defaults, columns),
|
65
|
-
$gutters : map-get($susy-defaults, gutters),
|
66
|
-
$spread : false
|
67
|
-
) {
|
68
|
-
@warn "[function] column-sum() has been renamed susy-sum().";
|
69
|
-
@return susy-sum($columns, $gutters, $spread);
|
70
|
-
}
|
71
|
-
|
72
56
|
|
73
57
|
// Susy Slice
|
74
58
|
// ----------
|
@@ -79,12 +63,12 @@
|
|
79
63
|
@function susy-slice(
|
80
64
|
$span,
|
81
65
|
$location,
|
82
|
-
$columns:
|
66
|
+
$columns: susy-get(columns)
|
83
67
|
) {
|
84
68
|
$columns: valid-columns($columns);
|
85
69
|
$sub-columns: $span;
|
86
70
|
|
87
|
-
@if not
|
71
|
+
@if not(is-symmetrical($columns)) {
|
88
72
|
$location: $location or 1;
|
89
73
|
$sub-columns: ();
|
90
74
|
@for $i from $location to ($location + $span) {
|
@@ -95,15 +79,6 @@
|
|
95
79
|
@return $sub-columns;
|
96
80
|
}
|
97
81
|
|
98
|
-
@function column-span(
|
99
|
-
$span,
|
100
|
-
$location,
|
101
|
-
$columns: map-get($susy-defaults, columns)
|
102
|
-
) {
|
103
|
-
@warn "[function] column-span() has been renamed susy-slice().";
|
104
|
-
@return susy-slice($span, $location, $columns);
|
105
|
-
}
|
106
|
-
|
107
82
|
|
108
83
|
// Susy
|
109
84
|
// ----
|
@@ -116,8 +91,8 @@
|
|
116
91
|
@function susy(
|
117
92
|
$span,
|
118
93
|
$location : false,
|
119
|
-
$columns :
|
120
|
-
$gutters :
|
94
|
+
$columns : susy-get(columns),
|
95
|
+
$gutters : susy-get(gutters),
|
121
96
|
$spread : false
|
122
97
|
) {
|
123
98
|
$columns: valid-columns($columns);
|
@@ -126,14 +101,3 @@
|
|
126
101
|
|
127
102
|
@return susy-sum($span, $gutters, $spread);
|
128
103
|
}
|
129
|
-
|
130
|
-
@function column-span-sum(
|
131
|
-
$span,
|
132
|
-
$location : false,
|
133
|
-
$columns : map-get($susy-defaults, columns),
|
134
|
-
$gutters : map-get($susy-defaults, gutters),
|
135
|
-
$spread : false
|
136
|
-
) {
|
137
|
-
@warn "[function] column-span-sum() has been renamed susy().";
|
138
|
-
@return susy($span, $location, $columns, $gutters, $spread);
|
139
|
-
}
|
@@ -1,6 +1,10 @@
|
|
1
1
|
// Settings
|
2
2
|
// ========
|
3
3
|
|
4
|
+
// Version
|
5
|
+
// -------
|
6
|
+
$su-version: 1.1;
|
7
|
+
|
4
8
|
|
5
9
|
// Default Settings
|
6
10
|
// ----------------
|
@@ -56,7 +60,7 @@ $susy: () !default;
|
|
56
60
|
$_return: null;
|
57
61
|
|
58
62
|
@each $opt in $_options {
|
59
|
-
@if type-of($opt) == map and not
|
63
|
+
@if type-of($opt) == map and not($_break) {
|
60
64
|
$_keyset: _susy-deep-has-key($opt, $key...);
|
61
65
|
@if $_keyset {
|
62
66
|
$_return: _susy-deep-get($opt, $key...);
|
@@ -54,7 +54,8 @@
|
|
54
54
|
$_n: 0 - $i;
|
55
55
|
$_level: _susy-truncate-list($_keys, $_length + $_n);
|
56
56
|
$_level: _susy-deep-get($map, $_level...);
|
57
|
-
$_merge:
|
57
|
+
$_merge: nth($_keys, $_n);
|
58
|
+
$_merge: ($_merge: $_value);
|
58
59
|
$_return: if($_level, map-merge($_level, $_merge), $_merge);
|
59
60
|
$_value: $_return;
|
60
61
|
}
|
@@ -95,7 +96,7 @@
|
|
95
96
|
$_stop: false;
|
96
97
|
|
97
98
|
@each $key in $keys {
|
98
|
-
@if not
|
99
|
+
@if not($_stop) {
|
99
100
|
$_return: map-has-key($map, $key);
|
100
101
|
}
|
101
102
|
|
@@ -26,7 +26,7 @@
|
|
26
26
|
$return: if($fail, $return, $columns);
|
27
27
|
}
|
28
28
|
|
29
|
-
@if $return != $columns and not
|
29
|
+
@if $return != $columns and not($silent) {
|
30
30
|
$return: null;
|
31
31
|
$warn: '$columns must be a unitless number or list of unitless numbers.';
|
32
32
|
@warn $warn + ' Current value [#{$type}]: #{$columns}';
|
@@ -48,7 +48,7 @@
|
|
48
48
|
|
49
49
|
@if $type == number and unitless($gutters) {
|
50
50
|
$return: $gutters;
|
51
|
-
} @else if not
|
51
|
+
} @else if not($silent) {
|
52
52
|
$warn: '$gutters must be a unitless number.';
|
53
53
|
@warn $warn + ' Current value [#{$type}]: #{$gutters}';
|
54
54
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: susy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0.beta.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Suzanne
|
@@ -54,9 +54,10 @@ extra_rdoc_files:
|
|
54
54
|
files:
|
55
55
|
- lib/compass-susy.rb
|
56
56
|
- lib/susy.rb
|
57
|
+
- sass/_su.scss
|
57
58
|
- sass/_susy.scss
|
58
59
|
- sass/_susyone.scss
|
59
|
-
- sass/susy/
|
60
|
+
- sass/susy/_su.scss
|
60
61
|
- sass/susy/language/_susy.scss
|
61
62
|
- sass/susy/language/_susyone.scss
|
62
63
|
- sass/susy/language/susy/_background.scss
|
@@ -83,11 +84,6 @@ files:
|
|
83
84
|
- sass/susy/language/susyone/_media.scss
|
84
85
|
- sass/susy/language/susyone/_padding.scss
|
85
86
|
- sass/susy/language/susyone/_settings.scss
|
86
|
-
- sass/susy/math/_su.scss
|
87
|
-
- sass/susy/math/su/_grid.scss
|
88
|
-
- sass/susy/math/su/_maps.scss
|
89
|
-
- sass/susy/math/su/_settings.scss
|
90
|
-
- sass/susy/math/su/_validation.scss
|
91
87
|
- sass/susy/output/_float.scss
|
92
88
|
- sass/susy/output/_shared.scss
|
93
89
|
- sass/susy/output/_support.scss
|
@@ -108,6 +104,10 @@ files:
|
|
108
104
|
- sass/susy/output/support/_prefix.scss
|
109
105
|
- sass/susy/output/support/_rem.scss
|
110
106
|
- sass/susy/output/support/_support.scss
|
107
|
+
- sass/susy/su/_grid.scss
|
108
|
+
- sass/susy/su/_settings.scss
|
109
|
+
- sass/susy/su/_utilities.scss
|
110
|
+
- sass/susy/su/_validation.scss
|
111
111
|
- templates/project/_grids.scss
|
112
112
|
- templates/project/manifest.rb
|
113
113
|
- templates/project/style.scss
|
@@ -136,9 +136,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: '0'
|
137
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
138
|
requirements:
|
139
|
-
- - '
|
139
|
+
- - '>'
|
140
140
|
- !ruby/object:Gem::Version
|
141
|
-
version:
|
141
|
+
version: 1.3.1
|
142
142
|
requirements: []
|
143
143
|
rubyforge_project: susy
|
144
144
|
rubygems_version: 2.1.10
|
data/sass/susy/_math.scss
DELETED