susy 2.0.0.beta.1 → 2.0.0.beta.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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/docs/changelog.rst +42 -1
- data/sass/susy/_math.scss +0 -1
- data/sass/susy/language/_shared.scss +4 -0
- data/sass/susy/language/_susy.scss +3 -1
- data/sass/susy/language/shared/_maps.scss +85 -0
- data/sass/susy/language/susy/_background.scss +59 -45
- data/sass/susy/language/susy/_bleed.scss +150 -29
- data/sass/susy/language/susy/_breakpoint-plugin.scss +1 -1
- data/sass/susy/language/susy/_container.scss +21 -21
- data/sass/susy/language/susy/_context.scss +5 -5
- data/sass/susy/language/susy/_gallery.scss +20 -20
- data/sass/susy/language/susy/_grids.scss +15 -25
- data/sass/susy/language/susy/_gutters.scss +14 -14
- data/sass/susy/language/susy/_isolate.scss +31 -9
- data/sass/susy/language/susy/_margins.scss +14 -4
- data/sass/susy/language/susy/_padding.scss +14 -4
- data/sass/susy/language/susy/_rows.scss +19 -16
- data/sass/susy/language/susy/_settings.scss +40 -14
- data/sass/susy/language/susy/_span.scss +5 -2
- data/sass/susy/math/_columns.scss +8 -8
- data/sass/susy/math/_settings.scss +1 -2
- data/sass/susy/math/_validation.scss +0 -16
- data/sass/susy/{api → output}/_float.scss +0 -0
- data/sass/susy/{api → output}/_shared.scss +0 -0
- data/sass/susy/{api → output}/float/_clearfix.scss +0 -0
- data/sass/susy/{api → output}/float/_container.scss +0 -0
- data/sass/susy/{api → output}/float/_end.scss +0 -0
- data/sass/susy/{api → output}/float/_isolate.scss +0 -0
- data/sass/susy/{api → output}/float/_span.scss +0 -0
- data/sass/susy/{api → output}/shared/_background.scss +0 -0
- data/sass/susy/{api → output}/shared/_box-sizing.scss +0 -0
- data/sass/susy/{api → output}/shared/_container.scss +0 -0
- data/sass/susy/{api → output}/shared/_direction.scss +0 -0
- data/sass/susy/{api → output}/shared/_margins.scss +0 -0
- data/sass/susy/{api → output}/shared/_padding.scss +0 -0
- metadata +16 -16
- data/sass/susy/_helpers.scss +0 -6
- data/sass/susy/math/_container.scss +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9db5246394497a4752238d5b432ce4e2e173995a
|
4
|
+
data.tar.gz: 06daf5683a28b569dcbca57308e3c07f5ed918ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21cf7cb67d634c0ed2a87819416148bbf9708b3b12b0ecf17e44b4675289a812522cb465f25f29101fe72b7d706ca7435a229ad14cffa80294f36bdd8e2562da
|
7
|
+
data.tar.gz: 39670449c17c8edbb172a4fc284627d0e3657c2efef048258c18f6a5f08260c31b92f4d7122369f9d45df89440e2facd831e82f72630b78eacdbb14f3ab05b4b
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.0.beta.
|
1
|
+
2.0.0.beta.1
|
data/docs/changelog.rst
CHANGED
@@ -2,7 +2,48 @@ Changelog
|
|
2
2
|
=========
|
3
3
|
|
4
4
|
|
5
|
-
2.0.0.beta.
|
5
|
+
2.0.0.beta.2 — Jan 6 2014
|
6
|
+
-------------------------
|
7
|
+
|
8
|
+
- Allow nesting of Susy settings.
|
9
|
+
- ``show-grid`` mixin can output either background or overlay grids.
|
10
|
+
- Add ``isolate`` function to return isolation offset width.
|
11
|
+
- Fix a bug with ``last`` output for ``split``-gutter layouts.
|
12
|
+
- Fix a bug with split-gutter ``span()``, and ``narrow``/``wider`` keywords.
|
13
|
+
- Fix a bug with ``bleed`` and ``null``+``inside`` gutters.
|
14
|
+
- ``bleed`` output uses TRBL shorthand when possible.
|
15
|
+
- Clean up and document the core math functions.
|
16
|
+
- Document upgrade path, core-math, and DIY grids.
|
17
|
+
|
18
|
+
BREAKING:
|
19
|
+
|
20
|
+
- Move debug settings into ``$susy: (debug: (<settings>));``.
|
21
|
+
- Replace ``show-grid`` setting with new ``debug: image`` setting.
|
22
|
+
- Add ``debug: output`` setting and keywords
|
23
|
+
to toggle between ``background`` and ``overlay`` grid images.
|
24
|
+
- Remove ``grid-overlay`` mixin.
|
25
|
+
|
26
|
+
+ Becomes part of ``show-grid`` mixin.
|
27
|
+
+ Doesn't take ``$selector`` argument — should be nested instead.
|
28
|
+
+ Can still be used multiple times.
|
29
|
+
|
30
|
+
- ``isolate`` mixin now interprets span argument as location,
|
31
|
+
unless location is otherwise specified.
|
32
|
+
|
33
|
+
+ ``isolate(2)`` is the same as ``isolate(at 2)``.
|
34
|
+
+ ``isolate(25%)`` will isolate *at* ``25%``.
|
35
|
+
|
36
|
+
- Rename setting controls for consistency.
|
37
|
+
|
38
|
+
+ ``set-grid`` => ``layout``
|
39
|
+
+ ``use-grid`` => ``with-layout``
|
40
|
+
|
41
|
+
- ``pad`` and ``squish`` use RL shorthand for shared context.
|
42
|
+
|
43
|
+
+ ``pad(1, 3 of 12)`` => ``pad(1 3 of 12)``
|
44
|
+
|
45
|
+
|
46
|
+
2.0.0.beta.1 — Dec 24 2013
|
6
47
|
--------------------------
|
7
48
|
|
8
49
|
- Add ``susy-breakpoint`` mixin for basic integration with `Breakpoint`_.
|
data/sass/susy/_math.scss
CHANGED
@@ -0,0 +1,85 @@
|
|
1
|
+
// Map Toolkit
|
2
|
+
// ===========
|
3
|
+
|
4
|
+
// Truncate List
|
5
|
+
// -------------
|
6
|
+
// - Return a list, truncated to a given length
|
7
|
+
@function truncate-list(
|
8
|
+
$list,
|
9
|
+
$length
|
10
|
+
) {
|
11
|
+
$return: ();
|
12
|
+
|
13
|
+
@for $i from 1 through length($list) {
|
14
|
+
$return: if($i <= $length, append($return, nth($list, $i)), $return);
|
15
|
+
}
|
16
|
+
|
17
|
+
@return $return;
|
18
|
+
}
|
19
|
+
|
20
|
+
// Deep Get
|
21
|
+
// --------
|
22
|
+
// - Return a value deep in nested maps
|
23
|
+
@function deep-get(
|
24
|
+
$map,
|
25
|
+
$keys...
|
26
|
+
) {
|
27
|
+
$return: $map;
|
28
|
+
|
29
|
+
@each $key in $keys {
|
30
|
+
@if type-of($return) == map {
|
31
|
+
$return: map-get($return, $key);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
@return $return;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Deep Set
|
39
|
+
// --------
|
40
|
+
// - Set a value deep in nested maps
|
41
|
+
@function deep-set(
|
42
|
+
$map,
|
43
|
+
$keys,
|
44
|
+
$value
|
45
|
+
) {
|
46
|
+
$length: length($keys);
|
47
|
+
$return: ();
|
48
|
+
|
49
|
+
@for $i from 1 through $length {
|
50
|
+
$n: 0 - $i;
|
51
|
+
$level: truncate-list($keys, $length + $n);
|
52
|
+
$level: deep-get($map, $level...);
|
53
|
+
$merge: (nth($keys, $n): $value);
|
54
|
+
$value: if($level, map-merge($level, $merge), $merge);
|
55
|
+
$return: $value;
|
56
|
+
}
|
57
|
+
|
58
|
+
@return $return;
|
59
|
+
}
|
60
|
+
|
61
|
+
// Deep Has-Key
|
62
|
+
// ------------
|
63
|
+
// - Return true if a deep key exists
|
64
|
+
@function deep-has-key(
|
65
|
+
$map,
|
66
|
+
$keys...
|
67
|
+
) {
|
68
|
+
$return: null;
|
69
|
+
$break: false;
|
70
|
+
|
71
|
+
@each $key in $keys {
|
72
|
+
@if not $break {
|
73
|
+
$return: map-has-key($map, $key);
|
74
|
+
}
|
75
|
+
|
76
|
+
@if $return {
|
77
|
+
$map: map-get($map, $key);
|
78
|
+
} @else {
|
79
|
+
$break: true;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
@return $return;
|
84
|
+
}
|
85
|
+
|
@@ -1,17 +1,37 @@
|
|
1
1
|
// Background Grid Syntax
|
2
2
|
// ======================
|
3
3
|
|
4
|
-
$
|
5
|
-
color: rgba(#66f, .25),
|
6
|
-
toggle: top right,
|
7
|
-
);
|
4
|
+
$susy-overlay-grid-head-exists: false;
|
8
5
|
|
9
|
-
|
10
|
-
//
|
11
|
-
//
|
6
|
+
|
7
|
+
// Show Grid/s
|
8
|
+
// -----------
|
9
|
+
// Show grid on any element using either background or overlay.
|
12
10
|
// - [$grid] : <settings>
|
13
11
|
@mixin show-grid(
|
14
12
|
$grid: $susy
|
13
|
+
) {
|
14
|
+
$output: debug-get(output, $grid);
|
15
|
+
|
16
|
+
@if $output == overlay {
|
17
|
+
@include overlay-grid($grid);
|
18
|
+
} @else {
|
19
|
+
@include background-grid($grid);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
@mixin show-grids(
|
24
|
+
$grid: $susy
|
25
|
+
) {
|
26
|
+
@include show-grid($grid);
|
27
|
+
}
|
28
|
+
|
29
|
+
// Background Grid
|
30
|
+
// ---------------
|
31
|
+
// Show a grid background on any element.
|
32
|
+
// - [$grid] : <settings>
|
33
|
+
@mixin background-grid(
|
34
|
+
$grid: $susy
|
15
35
|
) {
|
16
36
|
$output: get-background($grid);
|
17
37
|
|
@@ -29,27 +49,34 @@ $debug-defaults: (
|
|
29
49
|
}
|
30
50
|
}
|
31
51
|
|
32
|
-
@mixin show-grids(
|
33
|
-
$grid: $susy
|
34
|
-
) {
|
35
|
-
@include show-grid($grid);
|
36
|
-
}
|
37
52
|
|
38
|
-
// Grid
|
53
|
+
// Overlay Grid
|
39
54
|
// ------------
|
40
55
|
// Generate an icon to trigger grid-overlays on any given elements.
|
41
56
|
// $grids... : <selector> [<settings>] [, <selector>]*
|
42
|
-
@mixin grid
|
43
|
-
$
|
57
|
+
@mixin overlay-grid (
|
58
|
+
$grid: $susy
|
44
59
|
) {
|
45
|
-
head {
|
46
|
-
@include overlay-head;
|
47
|
-
|
48
|
-
|
60
|
+
@if not $susy-overlay-grid-head-exists {
|
61
|
+
@at-root head { @include overlay-head; }
|
62
|
+
$susy-overlay-grid-head-exists: true !global;
|
63
|
+
}
|
64
|
+
|
65
|
+
$selector: #{&};
|
66
|
+
|
67
|
+
@at-root head:hover {
|
68
|
+
~ #{$selector},
|
69
|
+
~ body #{$selector} {
|
70
|
+
position: relative;
|
71
|
+
&::before {
|
72
|
+
@include grid-overlay-base;
|
73
|
+
@include background-grid($grid);
|
74
|
+
}
|
49
75
|
}
|
50
76
|
}
|
51
77
|
}
|
52
78
|
|
79
|
+
|
53
80
|
// [Private] Overlay Head
|
54
81
|
// ----------------------
|
55
82
|
// <head> styles to create grid overlay toggle
|
@@ -86,31 +113,11 @@ $debug-defaults: (
|
|
86
113
|
}
|
87
114
|
}
|
88
115
|
|
89
|
-
// [Private] Overlay Backgrounds
|
90
|
-
// -----------------------------
|
91
|
-
// Parse and apply backgrounds for overlay-grid
|
92
|
-
@mixin overlay-backgrounds(
|
93
|
-
$grids...
|
94
|
-
) {
|
95
|
-
@each $grid in $grids {
|
96
|
-
$selector: nth($grid, 1);
|
97
|
-
$grid: if(length($grid) > 1, nth($grid, 2), $susy);
|
98
|
-
|
99
|
-
~ #{$selector},
|
100
|
-
~ body #{$selector} {
|
101
|
-
position: relative;
|
102
|
-
&::before {
|
103
|
-
@extend %grid-overlay-base;
|
104
|
-
@include show-grid($grid);
|
105
|
-
}
|
106
|
-
}
|
107
|
-
}
|
108
|
-
}
|
109
116
|
|
110
117
|
// [Private] Grid Overlay Base
|
111
118
|
// ---------------------------
|
112
119
|
// Base styles for generating a grid overlay
|
113
|
-
|
120
|
+
@mixin grid-overlay-base() {
|
114
121
|
position: absolute;
|
115
122
|
top: 0;
|
116
123
|
left: 0;
|
@@ -120,6 +127,7 @@ $debug-defaults: (
|
|
120
127
|
z-index: 998;
|
121
128
|
}
|
122
129
|
|
130
|
+
|
123
131
|
// Get Symmetrical Background
|
124
132
|
// --------------------------
|
125
133
|
// - $grid: <map>
|
@@ -158,6 +166,7 @@ $debug-defaults: (
|
|
158
166
|
@return $background;
|
159
167
|
}
|
160
168
|
|
169
|
+
|
161
170
|
// Get Asymmetrical Inside
|
162
171
|
// -----------------------
|
163
172
|
// - $grid: <settings>
|
@@ -196,6 +205,7 @@ $debug-defaults: (
|
|
196
205
|
@return $stops;
|
197
206
|
}
|
198
207
|
|
208
|
+
|
199
209
|
// Get Asymmetrical Split
|
200
210
|
// ----------------------
|
201
211
|
// - $grid: <settings>
|
@@ -227,6 +237,7 @@ $debug-defaults: (
|
|
227
237
|
@return $stops;
|
228
238
|
}
|
229
239
|
|
240
|
+
|
230
241
|
// Get Asymmetrical Outside
|
231
242
|
// ------------------------
|
232
243
|
// - $grid: <settings>
|
@@ -270,6 +281,7 @@ $debug-defaults: (
|
|
270
281
|
@return $stops;
|
271
282
|
}
|
272
283
|
|
284
|
+
|
273
285
|
// Get Asymmetrical Background
|
274
286
|
// ---------------------------
|
275
287
|
// - $grid: <settings>
|
@@ -289,6 +301,7 @@ $debug-defaults: (
|
|
289
301
|
@return (image: (columns: $stops));
|
290
302
|
}
|
291
303
|
|
304
|
+
|
292
305
|
// Get Background
|
293
306
|
// --------------
|
294
307
|
// - $grid: <settings>
|
@@ -296,7 +309,7 @@ $debug-defaults: (
|
|
296
309
|
$grid
|
297
310
|
) {
|
298
311
|
$grid : parse-grid($grid);
|
299
|
-
$show : susy-get(
|
312
|
+
$show : susy-get(debug image, $grid);
|
300
313
|
$return : ();
|
301
314
|
|
302
315
|
@if $show and $show != hide {
|
@@ -342,14 +355,15 @@ $debug-defaults: (
|
|
342
355
|
@return $return;
|
343
356
|
}
|
344
357
|
|
358
|
+
|
345
359
|
// Get Debug
|
346
360
|
// ---------
|
347
361
|
// Return the value of a debug setting
|
348
362
|
// - $key: <setting>
|
349
363
|
@function debug-get(
|
350
|
-
$key
|
364
|
+
$key,
|
365
|
+
$grid: $susy
|
351
366
|
) {
|
352
|
-
$
|
353
|
-
|
354
|
-
@return map-get($map, $key);
|
367
|
+
$key: join(debug, $key, space);
|
368
|
+
@return susy-get($key);
|
355
369
|
}
|
@@ -4,44 +4,24 @@
|
|
4
4
|
// Bleed
|
5
5
|
// -----
|
6
6
|
// Add negative margins, and equal positive padding to create bleed.
|
7
|
-
// - $
|
7
|
+
// - $bleed : <span>
|
8
8
|
@mixin bleed(
|
9
9
|
$bleed: 0 gutter()
|
10
10
|
) {
|
11
|
-
$
|
12
|
-
$trbl : susy-get(span, $bleed);
|
13
|
-
$spans : (top: 0, right: 0, bottom: 0, left: 0);
|
14
|
-
|
15
|
-
$i: 1;
|
16
|
-
@each $span in $trbl {
|
17
|
-
$this: map-merge($bleed, (span: $span));
|
18
|
-
$span: span($this);
|
11
|
+
$output: get-bleed($bleed);
|
19
12
|
|
20
|
-
|
21
|
-
|
22
|
-
} @else if $i == 2 {
|
23
|
-
$spans: map-merge($spans, (right: $span, left: $span));
|
24
|
-
} @else if $i == 3 {
|
25
|
-
$spans: map-merge($spans, (bottom: $span));
|
26
|
-
} @else if $i == 4 {
|
27
|
-
$spans: map-merge($spans, (left: $span));
|
28
|
-
}
|
29
|
-
$i: $i + 1;
|
30
|
-
}
|
31
|
-
|
32
|
-
@each $side, $span in $spans {
|
33
|
-
$padding: $span;
|
34
|
-
@if is-inside($bleed) and ($side == right or $side == left) {
|
35
|
-
$gutter: gutter($bleed);
|
36
|
-
$padding: if(comparable($padding, $gutter), $padding + $gutter, $padding);
|
37
|
-
}
|
38
|
-
margin-#{$side}: if($span != 0, 0 - $span, null);
|
39
|
-
padding-#{$side}: if($padding != 0, $padding, null);
|
13
|
+
@each $property, $value in $output {
|
14
|
+
#{$property}: $value;
|
40
15
|
}
|
41
16
|
|
42
17
|
@include susy-box-sizing(content-box);
|
43
18
|
}
|
44
19
|
|
20
|
+
|
21
|
+
// Bleed-x
|
22
|
+
// -------
|
23
|
+
// Shortcut for horizontal bleed.
|
24
|
+
// - $bleed : <span>
|
45
25
|
@mixin bleed-x(
|
46
26
|
$bleed: gutter()
|
47
27
|
) {
|
@@ -59,6 +39,11 @@
|
|
59
39
|
@include bleed($bleed);
|
60
40
|
}
|
61
41
|
|
42
|
+
|
43
|
+
// Bleed-y
|
44
|
+
// -------
|
45
|
+
// Shortcut for vertical bleed.
|
46
|
+
// - $bleed : <span>
|
62
47
|
@mixin bleed-y(
|
63
48
|
$bleed: if(function-exists(rhythm), rhythm(1), 1em)
|
64
49
|
) {
|
@@ -75,3 +60,139 @@
|
|
75
60
|
|
76
61
|
@include bleed($bleed);
|
77
62
|
}
|
63
|
+
|
64
|
+
|
65
|
+
// Get Bleed
|
66
|
+
// ---------
|
67
|
+
// Return bleed output values
|
68
|
+
// - $bleed: <span>
|
69
|
+
@function get-bleed(
|
70
|
+
$bleed
|
71
|
+
) {
|
72
|
+
$bleed : map-merge((spread: wide), parse-span($bleed));
|
73
|
+
$trbl : susy-get(span, $bleed);
|
74
|
+
$short : null;
|
75
|
+
$output : ();
|
76
|
+
|
77
|
+
@for $i from 1 through length($trbl) {
|
78
|
+
$this: nth($trbl, $i);
|
79
|
+
$new: ();
|
80
|
+
$margin: null;
|
81
|
+
$padding: null;
|
82
|
+
$padding-x: null;
|
83
|
+
|
84
|
+
@if $this > 0 {
|
85
|
+
$this: map-merge($bleed, (span: $this));
|
86
|
+
$margin: span($this);
|
87
|
+
$padding: $margin;
|
88
|
+
$padding-x: $padding;
|
89
|
+
}
|
90
|
+
|
91
|
+
@if $margin and $margin > 0 {
|
92
|
+
$margin: - $margin;
|
93
|
+
|
94
|
+
@if is-inside($this) {
|
95
|
+
$gutter: gutter($this);
|
96
|
+
$join: if($gutter and comparable($padding, $gutter), true, false);
|
97
|
+
$padding-x: if($join and $padding > 0, $padding + $gutter, $padding);
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
@if $i == 1 {
|
102
|
+
$new: (
|
103
|
+
margin-top: $margin,
|
104
|
+
padding-top: $padding,
|
105
|
+
margin-right: $margin,
|
106
|
+
padding-right: $padding-x,
|
107
|
+
margin-bottom: $margin,
|
108
|
+
padding-bottom: $padding,
|
109
|
+
margin-left: $margin,
|
110
|
+
padding-left: $padding-x,
|
111
|
+
);
|
112
|
+
} @else if $i == 2 {
|
113
|
+
$new: (
|
114
|
+
margin-right: $margin,
|
115
|
+
padding-right: $padding-x,
|
116
|
+
margin-left: $margin,
|
117
|
+
padding-left: $padding-x,
|
118
|
+
);
|
119
|
+
} @else if $i == 3 {
|
120
|
+
$new: (
|
121
|
+
margin-bottom: $margin,
|
122
|
+
padding-bottom: $padding,
|
123
|
+
);
|
124
|
+
} @else if $i == 4 {
|
125
|
+
$new: (
|
126
|
+
margin-left: $margin,
|
127
|
+
padding-left: $padding-x,
|
128
|
+
);
|
129
|
+
}
|
130
|
+
|
131
|
+
$output: map-merge($output, $new);
|
132
|
+
}
|
133
|
+
|
134
|
+
@each $prop, $value in $output {
|
135
|
+
$output: if($value == 0, map-merge($output, ($prop: null)), $output);
|
136
|
+
}
|
137
|
+
|
138
|
+
@return bleed-shorthand($output);
|
139
|
+
}
|
140
|
+
|
141
|
+
// Bleed Shorthand
|
142
|
+
// ---------------
|
143
|
+
// Convert bleed output into shorthand when possible.
|
144
|
+
// - $bleed: <output map>
|
145
|
+
@function bleed-shorthand(
|
146
|
+
$bleed
|
147
|
+
) {
|
148
|
+
$margin: ();
|
149
|
+
$padding: ();
|
150
|
+
$return: ();
|
151
|
+
|
152
|
+
@each $key, $value in $bleed {
|
153
|
+
@if str-index($key, margin) > 0 {
|
154
|
+
$margin: map-merge($margin, ($key: $value));
|
155
|
+
} @else if str-index($key, padding) > 0 {
|
156
|
+
$padding: map-merge($padding, ($key: $value));
|
157
|
+
}
|
158
|
+
}
|
159
|
+
|
160
|
+
$props: (
|
161
|
+
margin: $margin,
|
162
|
+
padding: $padding,
|
163
|
+
);
|
164
|
+
|
165
|
+
@each $name, $map in $props {
|
166
|
+
$four: if(length(map-keys($map)) == 4, true, false);
|
167
|
+
$null: if(index(map-values($map), null), true, false);
|
168
|
+
|
169
|
+
@if $four and not $null {
|
170
|
+
$top: map-get($map, '#{$name}-top');
|
171
|
+
$right: map-get($map, '#{$name}-right');
|
172
|
+
$bottom: map-get($map, '#{$name}-bottom');
|
173
|
+
$left: map-get($map, '#{$name}-left');
|
174
|
+
|
175
|
+
$tb: if($top == $bottom, $top, null);
|
176
|
+
$rl: if($right == $left, $right, null);
|
177
|
+
$all: if($tb == $rl, $tb, null);
|
178
|
+
|
179
|
+
$new: if($all, $all, null);
|
180
|
+
|
181
|
+
@if not $new {
|
182
|
+
@if $tb and $rl {
|
183
|
+
$new: $tb $rl;
|
184
|
+
} @else if $rl {
|
185
|
+
$new: $top $rl $bottom;
|
186
|
+
} @else {
|
187
|
+
$new: $top $right $bottom $left;
|
188
|
+
}
|
189
|
+
}
|
190
|
+
|
191
|
+
$return: map-merge($return, ($name: $new));
|
192
|
+
} @else {
|
193
|
+
$return: map-merge($return, $map);
|
194
|
+
}
|
195
|
+
}
|
196
|
+
|
197
|
+
@return $return;
|
198
|
+
}
|