susy 3.0.0.alpha.5 → 3.0.0.alpha.6
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/CHANGELOG.md +50 -0
- data/README.md +73 -16
- data/VERSION +1 -1
- data/sass/_prefix.scss +1 -0
- data/sass/plugins/svg-grid/_svg-api.scss +1 -14
- data/sass/susy/_api.scss +7 -41
- data/sass/susy/_parser.scss +53 -15
- data/sass/susy/_plugin-helpers.scss +99 -0
- data/sass/susy/_unprefix.scss +9 -6
- data/sass/susy/_utilities.scss +0 -34
- metadata +17 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 519e857203e1b3d776c16243765fd668de840a69
|
4
|
+
data.tar.gz: 51c147b2f1ff268e307bee275c6ad3922ecfc753
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2d21d7284ebe3e8ca7aa3539fec194ecbfc63f5b88fc2ec6e1db47adea2f3f4fa9bd9be3e654402272a2344ba6b1da31e50d3ddb12f37fc2586da6b00c82b18
|
7
|
+
data.tar.gz: b6742401269cd54803d6544a1ad5371502204958620aa9111633a49751aaf16294d372880be52f7b41e0105d6e6ca583eb425ca1e02308b293fe24ecf945217f
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,56 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
+
3.0.0.rc.1 - UNRELEASED
|
5
|
+
-----------------------
|
6
|
+
|
7
|
+
- Add `susy-repeat()` function
|
8
|
+
to generate repeating gradients with the same syntax
|
9
|
+
provided in CSS Grid templates
|
10
|
+
- Add `susy-compile()` and `susy-call()` plugin helpers,
|
11
|
+
to aide with conversions between the user API and
|
12
|
+
internal math functions.
|
13
|
+
|
14
|
+
|
15
|
+
3.0.0.alpha.5 - Feb 14, 2017
|
16
|
+
----------------------------
|
17
|
+
|
18
|
+
- SVG Grid plugin, to provide grid-debugging options:
|
19
|
+
- `svg-grid-colors` global setting accepts one or more colors
|
20
|
+
- `susy-svg-grid()` function returns inline svg
|
21
|
+
for use in the `background` or generated `content` properties
|
22
|
+
- Add `set-gutters $n` shorthand to override global gutter settings
|
23
|
+
- Allow gutters function to take either context-only,
|
24
|
+
or full span/context shorthand —
|
25
|
+
useful when passing in details from a combined mixin
|
26
|
+
- More test coverage, including error-handling!
|
27
|
+
|
28
|
+
|
29
|
+
3.0.0.alpha.1 - Sep 6, 2016
|
30
|
+
---------------------------
|
31
|
+
|
32
|
+
- No Mixins!
|
33
|
+
- Trim down to the core math, and a thin layer of api functions:
|
34
|
+
- `susy-span()` to return a column-spanning width
|
35
|
+
- `susy-gutter()` to return a gutter width
|
36
|
+
- `susy-slice()` to return a slice of asymmetrical grid
|
37
|
+
- Simplify to four settings:
|
38
|
+
- `columns` to define the grid columns
|
39
|
+
as a list of comparable or unitless relative numbers
|
40
|
+
- `gutters` to define the size of a gutter
|
41
|
+
in units comparable to the columns,
|
42
|
+
or a unitless relative number
|
43
|
+
- `spread` to define the default spread of a span
|
44
|
+
across adjacent gutters
|
45
|
+
- `container-spread` to define the default spread of a container
|
46
|
+
across side-edge gutters
|
47
|
+
- Shorthand syntax for overriding settings on-the-fly:
|
48
|
+
- starting with a count, length, or column-list span
|
49
|
+
- `at $n`, `first`, or `last` location on asymmetrical grids
|
50
|
+
- `narrow`, `wide`, or `wider` for spread
|
51
|
+
- `of $n <spread>` for available grid columns and container-spread
|
52
|
+
|
53
|
+
|
4
54
|
2.2.5 - May 14 2015
|
5
55
|
-------------------
|
6
56
|
|
data/README.md
CHANGED
@@ -16,14 +16,6 @@ This is truely a grids-on-demand approach,
|
|
16
16
|
where you build your own system,
|
17
17
|
and we handle the math.
|
18
18
|
|
19
|
-
We're planning to build various output-modules
|
20
|
-
with mixins to help you get started.
|
21
|
-
We'll probably start with a float-based module,
|
22
|
-
and a flexbox module.
|
23
|
-
If you have ideas for another plugin,
|
24
|
-
or want to help move floats or flexbox along,
|
25
|
-
pull requests are welcome!
|
26
|
-
|
27
19
|
|
28
20
|
Getting Started
|
29
21
|
---------------
|
@@ -36,13 +28,17 @@ npm install susy@pre
|
|
36
28
|
```
|
37
29
|
|
38
30
|
There are two imports to choose from.
|
39
|
-
The default `sass/
|
31
|
+
The default `sass/susy` comes with
|
40
32
|
un-prefixed versions of the core API functions.
|
41
33
|
If you want Susy to be name-spaced,
|
42
|
-
import `sass/
|
34
|
+
import `sass/prefix` instead.
|
43
35
|
|
44
36
|
```scss
|
45
|
-
|
37
|
+
// un-prefixed api functions
|
38
|
+
@import '<path-to>/susy/sass/susy';
|
39
|
+
|
40
|
+
// fully-prefixed functions
|
41
|
+
@import '<path-to>/susy/sass/prefix';
|
46
42
|
```
|
47
43
|
|
48
44
|
|
@@ -83,6 +79,8 @@ you can use the old `at $n`, `first`, or `last` syntax
|
|
83
79
|
to describe the specific columns you want to span —
|
84
80
|
e.g. `susy-span(3 at 2 of (1 2 3 4 5 6))`
|
85
81
|
to span across `(2 3 4)`.
|
82
|
+
To define new gutter-values in the shorthand syntax,
|
83
|
+
use `set-gutters $n`.
|
86
84
|
|
87
85
|
You can use these two functions
|
88
86
|
to build all sorts of grids:
|
@@ -99,6 +97,7 @@ to build all sorts of grids:
|
|
99
97
|
padding: gutter() / 2;
|
100
98
|
}
|
101
99
|
|
100
|
+
|
102
101
|
// Make your own class system!
|
103
102
|
.span {
|
104
103
|
float: left;
|
@@ -138,7 +137,7 @@ $static: (5em 5em 5em 5em 5em 5em);
|
|
138
137
|
// six unequal fluid columns
|
139
138
|
$asymmetrical: (1 1 2 3 5 8);
|
140
139
|
|
141
|
-
// six unequal
|
140
|
+
// six unequal static columns
|
142
141
|
// you can mix units, as long as they are comparable...
|
143
142
|
$strange: (1in 1cm 2pt 3mm 5in 8cm);
|
144
143
|
```
|
@@ -156,6 +155,22 @@ $fluid: 6;
|
|
156
155
|
$static: 6 x 120px;
|
157
156
|
```
|
158
157
|
|
158
|
+
We also provide a function
|
159
|
+
that mimics CSS Grids `repeat()`
|
160
|
+
to generate repetative grid definitions:
|
161
|
+
|
162
|
+
```scss
|
163
|
+
// six equal fluid columns
|
164
|
+
$fluid: susy-repeat(6);
|
165
|
+
|
166
|
+
// six 120px static columns
|
167
|
+
$static: susy-repeat(6, 120px);
|
168
|
+
|
169
|
+
// 12 columns, alternating 4em and 6em
|
170
|
+
$static: susy-repeat(6, 4em 6em);
|
171
|
+
```
|
172
|
+
|
173
|
+
|
159
174
|
**Gutters**
|
160
175
|
are defined relative to columns,
|
161
176
|
in comparable units.
|
@@ -183,14 +198,56 @@ will be treated as a global default
|
|
183
198
|
across your project.
|
184
199
|
|
185
200
|
|
201
|
+
Debugging Plugin: SVG Grid Image
|
202
|
+
--------------------------------
|
203
|
+
|
204
|
+
If you want to generate svg-backgrounds
|
205
|
+
for help visualizing and debugging your grids,
|
206
|
+
import the SVG Grid Plugin:
|
207
|
+
|
208
|
+
```
|
209
|
+
// unprefixed
|
210
|
+
@import '<path-to>/susy/sass/plugins/svg-grid';
|
211
|
+
|
212
|
+
// prefixed
|
213
|
+
@import '<path-to>/susy/sass/plugins/svg-grid/prefix';
|
214
|
+
```
|
215
|
+
|
216
|
+
The plugin adds `svg-grid-colors` setting
|
217
|
+
to your global defaults,
|
218
|
+
which you can override in `$susy`.
|
219
|
+
It also provides you with a new function,
|
220
|
+
`susy-svg-grids()`,
|
221
|
+
which will return inline svg for use in
|
222
|
+
backgrounds or generated content:
|
223
|
+
|
224
|
+
```scss
|
225
|
+
// usage
|
226
|
+
background: susy-svg-grids() no-repeat scroll;
|
227
|
+
|
228
|
+
// output sample
|
229
|
+
background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg"
|
230
|
+
fill="%239cc" %3E%3Crect x="1em" width="44.44444%"
|
231
|
+
height="100%" /%3E%3Crect x="55.55556%" width="44.44444%"
|
232
|
+
height="100%" style="transform:translateX(1em)"
|
233
|
+
/%3E%3C/svg%3E') no-repeat scroll;
|
234
|
+
```
|
235
|
+
|
236
|
+
|
186
237
|
Advanced Features
|
187
238
|
-----------------
|
188
239
|
|
189
240
|
Once you get used to the basics,
|
190
|
-
you can dig into the
|
191
|
-
|
192
|
-
|
193
|
-
|
241
|
+
you can dig into some of the more advanced features:
|
242
|
+
|
243
|
+
- Use the `spread` and `container-spread` options
|
244
|
+
to include extra gutters in a span, or it's container.
|
245
|
+
- Use the `susy-slice()` function
|
246
|
+
to handle nesting-context with asymmetrical grids.
|
247
|
+
- Use `susy-compile()` and `susy-call`
|
248
|
+
to quickly access the full power of our
|
249
|
+
syntax-parsing and math engines,
|
250
|
+
while building plugins of your own.
|
194
251
|
|
195
252
|
Happy grid-building!
|
196
253
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.0.alpha.
|
1
|
+
3.0.0.alpha.6
|
data/sass/_prefix.scss
CHANGED
@@ -28,20 +28,7 @@
|
|
28
28
|
$offset: null
|
29
29
|
) {
|
30
30
|
// Grid parsing & normalizing
|
31
|
-
|
32
|
-
@if (not index($grid, 'of')) {
|
33
|
-
@if su-valid-columns($grid, 'fail-silent') {
|
34
|
-
$grid: 'of' $grid;
|
35
|
-
} @else {
|
36
|
-
$grid: join('of', $grid);
|
37
|
-
}
|
38
|
-
}
|
39
|
-
|
40
|
-
$grid: susy-parse($grid);
|
41
|
-
}
|
42
|
-
|
43
|
-
$grid: susy-settings($grid);
|
44
|
-
$grid: susy-normalize($grid);
|
31
|
+
$grid: susy-compile($grid, $context-only: true);
|
45
32
|
|
46
33
|
|
47
34
|
// Color and gradient handling
|
data/sass/susy/_api.scss
CHANGED
@@ -47,21 +47,10 @@
|
|
47
47
|
$span,
|
48
48
|
$config: ()
|
49
49
|
) {
|
50
|
-
$
|
51
|
-
$normal: susy-normalize($input);
|
50
|
+
$output: susy-compile($span, $config);
|
52
51
|
|
53
|
-
@if map-get($
|
54
|
-
|
55
|
-
'span', 'columns', 'gutters', 'spread', 'container-spread', 'location'
|
56
|
-
);
|
57
|
-
|
58
|
-
@each $key in map-keys($normal) {
|
59
|
-
@if not (index($args, $key)) {
|
60
|
-
$normal: map-remove($normal, $key);
|
61
|
-
}
|
62
|
-
}
|
63
|
-
|
64
|
-
@return su-span($normal...);
|
52
|
+
@if map-get($output, 'span') {
|
53
|
+
@return susy-call('su-span', $output);
|
65
54
|
}
|
66
55
|
|
67
56
|
$actual: '[#{type-of($span)}] `#{inspect($span)}`';
|
@@ -100,25 +89,9 @@
|
|
100
89
|
$context: susy-get('columns'),
|
101
90
|
$config: ()
|
102
91
|
) {
|
103
|
-
|
104
|
-
@if su-valid-columns($context, 'fail-silent') {
|
105
|
-
$context: 'of' $context;
|
106
|
-
} @else {
|
107
|
-
$context: join('of', $context);
|
108
|
-
}
|
109
|
-
}
|
110
|
-
|
111
|
-
$parsed: susy-settings($config, susy-parse($context));
|
112
|
-
$normal: susy-normalize($parsed);
|
113
|
-
$args: ('columns', 'gutters', 'container-spread');
|
92
|
+
$context: susy-compile($context, $config, 'context-only');
|
114
93
|
|
115
|
-
@
|
116
|
-
@if not (index($args, $key)) {
|
117
|
-
$normal: map-remove($normal, $key);
|
118
|
-
}
|
119
|
-
}
|
120
|
-
|
121
|
-
@return su-gutter($normal...);
|
94
|
+
@return susy-call('su-gutter', $context);
|
122
95
|
}
|
123
96
|
|
124
97
|
|
@@ -152,14 +125,7 @@
|
|
152
125
|
$span,
|
153
126
|
$config: ()
|
154
127
|
) {
|
155
|
-
$
|
156
|
-
$input: susy-settings($config, susy-parse($span));
|
157
|
-
$normal: susy-normalize($input);
|
158
|
-
$output: ();
|
159
|
-
|
160
|
-
@each $setting in $args {
|
161
|
-
$output: map-merge($output, ($setting: map-get($normal, $setting)));
|
162
|
-
}
|
128
|
+
$span: susy-compile($span, $config);
|
163
129
|
|
164
|
-
@return su-slice
|
130
|
+
@return susy-call('su-slice', $span);
|
165
131
|
}
|
data/sass/susy/_parser.scss
CHANGED
@@ -25,7 +25,7 @@
|
|
25
25
|
/// - `of $n <spread>` for available grid columns
|
26
26
|
/// and spread of the container;
|
27
27
|
/// - and `set-gutters $n` to override global gutter settings
|
28
|
-
/// @param {Bool} $context-only -
|
28
|
+
/// @param {Bool} $context-only [false] -
|
29
29
|
/// Allow the parser to ignore span and span-spread values,
|
30
30
|
/// only parsing context and container-spread
|
31
31
|
///
|
@@ -34,7 +34,8 @@
|
|
34
34
|
/// (`span`, `location`, `columns`, `gutters`, `spread`, `container-spread`)
|
35
35
|
/// parsed from shorthand input
|
36
36
|
@function susy-parse(
|
37
|
-
$shorthand
|
37
|
+
$shorthand,
|
38
|
+
$context-only: false
|
38
39
|
) {
|
39
40
|
$parse-error: 'Unknown shorthand property:';
|
40
41
|
$options: (
|
@@ -54,6 +55,15 @@
|
|
54
55
|
$of: null;
|
55
56
|
$next: false;
|
56
57
|
|
58
|
+
// Allow context-only shorthand, without span
|
59
|
+
@if ($context-only) and (not index($shorthand, 'of')) {
|
60
|
+
@if su-valid-columns($shorthand, 'fail-silent') {
|
61
|
+
$shorthand: 'of' $shorthand;
|
62
|
+
} @else {
|
63
|
+
$shorthand: join('of', $shorthand);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
57
67
|
// loop through the shorthand list
|
58
68
|
@for $i from 1 through length($shorthand) {
|
59
69
|
$item: nth($shorthand, $i);
|
@@ -170,8 +180,13 @@
|
|
170
180
|
|
171
181
|
@if $value {
|
172
182
|
$function: if(($setting == 'container-spread'), 'spread', $setting);
|
173
|
-
$function:
|
174
|
-
|
183
|
+
$function: 'susy-normalize-#{$function}';
|
184
|
+
|
185
|
+
@if function-exists('get-function') {
|
186
|
+
$function: get-function($function);
|
187
|
+
}
|
188
|
+
|
189
|
+
$value: call($function, $value);
|
175
190
|
}
|
176
191
|
|
177
192
|
$config: map-merge($config, ($setting: $value));
|
@@ -196,6 +211,37 @@
|
|
196
211
|
|
197
212
|
|
198
213
|
|
214
|
+
// Repeat
|
215
|
+
// ------
|
216
|
+
/// Similar to the `repeat(<count>, <value>)` function
|
217
|
+
/// that is available in CSS Grid templates,
|
218
|
+
/// repeats any value a given number of times —
|
219
|
+
/// a useful shortcut for defining symetrical static grids
|
220
|
+
///
|
221
|
+
/// @group a-config
|
222
|
+
///
|
223
|
+
/// @param {Integer} $count -
|
224
|
+
/// The number of repetitions
|
225
|
+
/// @param {Any} $value -
|
226
|
+
/// Any value can be repeated
|
227
|
+
///
|
228
|
+
/// @return {List} -
|
229
|
+
/// List of repeated values
|
230
|
+
@function susy-repeat(
|
231
|
+
$count,
|
232
|
+
$value: 1
|
233
|
+
) {
|
234
|
+
$return: ();
|
235
|
+
|
236
|
+
@for $i from 1 through $count {
|
237
|
+
$return: join($return, $value);
|
238
|
+
}
|
239
|
+
|
240
|
+
@return $return;
|
241
|
+
}
|
242
|
+
|
243
|
+
|
244
|
+
|
199
245
|
// Normalize Columns
|
200
246
|
// -----------------
|
201
247
|
/// Normalize `columns` shorthand for Su
|
@@ -213,19 +259,11 @@
|
|
213
259
|
$return: ();
|
214
260
|
|
215
261
|
@if (type-of($columns) == 'number') and unitless($columns) {
|
216
|
-
@
|
217
|
-
$return: append($return, 1);
|
218
|
-
}
|
219
|
-
|
220
|
-
@return $return;
|
262
|
+
@return susy-repeat($columns);
|
221
263
|
} @else if index($columns, 'x') and length($columns) == 3 {
|
264
|
+
$count: nth($columns, 1);
|
222
265
|
$width: nth($columns, -1);
|
223
|
-
|
224
|
-
@for $i from 1 through nth($columns, 1) {
|
225
|
-
$return: append($return, $width);
|
226
|
-
}
|
227
|
-
|
228
|
-
@return $return;
|
266
|
+
@return susy-repeat($count, $width);
|
229
267
|
}
|
230
268
|
|
231
269
|
@return $columns;
|
@@ -0,0 +1,99 @@
|
|
1
|
+
// Plugin Helpers
|
2
|
+
// ==============
|
3
|
+
// - susy-compile [function]
|
4
|
+
// - susy-call [function]
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
// Compile
|
9
|
+
// -------
|
10
|
+
/// Combines parsed shorthand
|
11
|
+
/// with local and global config,
|
12
|
+
/// normalizing the results
|
13
|
+
/// into a standard Susy settings map.
|
14
|
+
///
|
15
|
+
/// @group plugin-helpers
|
16
|
+
///
|
17
|
+
/// @param {List | Map} $shorthand -
|
18
|
+
/// Shorthand expression to define the width of the span,
|
19
|
+
/// optionally containing:
|
20
|
+
/// - a count, length, or column-list span;
|
21
|
+
/// - `at $n`, `first`, or `last` location on asymmetrical grids;
|
22
|
+
/// - `narrow`, `wide`, or `wider` for optionally spreading
|
23
|
+
/// across adjacent gutters;
|
24
|
+
/// - `of $n <spread>` for available grid columns
|
25
|
+
/// and spread of the container;
|
26
|
+
/// - and `set-gutters $n` to override
|
27
|
+
/// global gutter settings
|
28
|
+
/// @param {Map} $config [()] -
|
29
|
+
/// Optional map of Susy grid configuration settings
|
30
|
+
/// @param {Bool} $context-only [false] -
|
31
|
+
/// Allow the parser to ignore span and span-spread values,
|
32
|
+
/// only parsing context and container-spread
|
33
|
+
///
|
34
|
+
/// @return {Map} -
|
35
|
+
/// Parsed and normalized map of settings,
|
36
|
+
/// based on global and local configuration,
|
37
|
+
/// alongwith shorthad adjustments.
|
38
|
+
///
|
39
|
+
/// @example scss -
|
40
|
+
/// $grid-data: susy-compile($user-input, $config);
|
41
|
+
/// width: susy-call('su-span', $grid-data);
|
42
|
+
@function susy-compile(
|
43
|
+
$short,
|
44
|
+
$config: (),
|
45
|
+
$context-only: false
|
46
|
+
) {
|
47
|
+
@if (type-of($short) != 'map') and (length($short) > 0) {
|
48
|
+
$short: susy-parse($short, $context-only);
|
49
|
+
}
|
50
|
+
|
51
|
+
$merge: susy-settings($config, $short);
|
52
|
+
$normal: susy-normalize($merge);
|
53
|
+
|
54
|
+
@return $normal;
|
55
|
+
}
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
// Call
|
60
|
+
// ----
|
61
|
+
/// Calls a given grid function
|
62
|
+
/// using the approapriate arguments
|
63
|
+
/// from the passed-in config.
|
64
|
+
///
|
65
|
+
/// @group plugin-helpers
|
66
|
+
///
|
67
|
+
/// @param {String} $name -
|
68
|
+
/// Name of the `su-` function to call
|
69
|
+
/// @param {Map} $config -
|
70
|
+
/// Map of Susy configuration settings to use as needed for arguments
|
71
|
+
///
|
72
|
+
/// @return {Any} -
|
73
|
+
/// Results of the called function
|
74
|
+
///
|
75
|
+
/// @example scss -
|
76
|
+
/// $grid-data: susy-compile($user-input, $config);
|
77
|
+
/// width: susy-call('su-span', $grid-data);
|
78
|
+
@function susy-call(
|
79
|
+
$name,
|
80
|
+
$config
|
81
|
+
) {
|
82
|
+
$grid-function-args: (
|
83
|
+
'su-span': ('span', 'columns', 'gutters', 'spread', 'container-spread', 'location' ),
|
84
|
+
'su-gutter': ('columns', 'gutters', 'container-spread'),
|
85
|
+
'su-slice': ('span', 'columns', 'location'),
|
86
|
+
'su-sum': ('columns', 'gutters', 'spread'),
|
87
|
+
);
|
88
|
+
|
89
|
+
$args: map-get($grid-function-args, $name);
|
90
|
+
$call: if(function-exists('get-function'), get-function($name), $name);
|
91
|
+
$output: ();
|
92
|
+
|
93
|
+
@each $arg in $args {
|
94
|
+
$value: map-get($config, $arg);
|
95
|
+
$output: if($value, map-merge($output, ($arg: $value)), $output);
|
96
|
+
}
|
97
|
+
|
98
|
+
@return call($call, $output...);
|
99
|
+
}
|
data/sass/susy/_unprefix.scss
CHANGED
@@ -5,8 +5,9 @@
|
|
5
5
|
// Span
|
6
6
|
// ----
|
7
7
|
/// Un-prefixed alias for `susy-span`
|
8
|
+
/// (available by default)
|
8
9
|
///
|
9
|
-
/// @group
|
10
|
+
/// @group api
|
10
11
|
/// @alias susy-span
|
11
12
|
///
|
12
13
|
/// @param {List} $span
|
@@ -22,25 +23,27 @@
|
|
22
23
|
// Gutter
|
23
24
|
// ------
|
24
25
|
/// Un-prefixed alias for `susy-gutter`
|
26
|
+
/// (available by default)
|
25
27
|
///
|
26
|
-
/// @group
|
28
|
+
/// @group api
|
27
29
|
/// @alias susy-gutter
|
28
30
|
///
|
29
|
-
/// @param {Integer | List} $
|
31
|
+
/// @param {Integer | List} $context [null] -
|
30
32
|
/// @param {Map} $config [()]
|
31
33
|
@function gutter(
|
32
|
-
$
|
34
|
+
$context: susy-get('columns'),
|
33
35
|
$config: ()
|
34
36
|
) {
|
35
|
-
@return susy-gutter($
|
37
|
+
@return susy-gutter($context, $config);
|
36
38
|
}
|
37
39
|
|
38
40
|
|
39
41
|
// Slice
|
40
42
|
// -----
|
41
43
|
/// Un-prefixed alias for `susy-slice`
|
44
|
+
/// (available by default)
|
42
45
|
///
|
43
|
-
/// @group
|
46
|
+
/// @group api
|
44
47
|
/// @alias susy-slice
|
45
48
|
///
|
46
49
|
/// @param {List} $span
|
data/sass/susy/_utilities.scss
CHANGED
@@ -1,44 +1,10 @@
|
|
1
1
|
// Sass Utilities
|
2
2
|
// ==============
|
3
|
-
// - Susy Get Function [function]
|
4
3
|
// - Susy Error Output Override [variable]
|
5
4
|
// - Susy Error [function]
|
6
5
|
|
7
6
|
|
8
7
|
|
9
|
-
// Susy Get Function
|
10
|
-
// -----------------
|
11
|
-
/// Get a first-class function in Sass 3.5+,
|
12
|
-
/// or the function name string (unchanged)
|
13
|
-
/// in older Sass versions.
|
14
|
-
///
|
15
|
-
/// @access private
|
16
|
-
///
|
17
|
-
/// @param {String} $function -
|
18
|
-
/// The name (string) of a function to be called.
|
19
|
-
/// @return {String | Function} -
|
20
|
-
/// Returns a first-class function in Sass 3.5+,
|
21
|
-
/// or the function name string in older Sass versions.
|
22
|
-
@function _susy-get-function(
|
23
|
-
$function
|
24
|
-
) {
|
25
|
-
$type: type-of($function);
|
26
|
-
|
27
|
-
@if ($type != 'string') {
|
28
|
-
@return _susy-error(
|
29
|
-
'Invalid function-name [#{$type}] `#{$function}`, name must be a string.',
|
30
|
-
'_susy-get-function');
|
31
|
-
}
|
32
|
-
|
33
|
-
@if function-exists('get-function') {
|
34
|
-
@return get-function($function);
|
35
|
-
}
|
36
|
-
|
37
|
-
@return $function;
|
38
|
-
}
|
39
|
-
|
40
|
-
|
41
|
-
|
42
8
|
// Susy Error Output Override
|
43
9
|
// --------------------------
|
44
10
|
$_susy-error-output-override: false !default;
|
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: 3.0.0.alpha.
|
4
|
+
version: 3.0.0.alpha.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miriam Eric Suzanne
|
@@ -14,20 +14,20 @@ dependencies:
|
|
14
14
|
name: sass
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.3.0
|
20
|
-
- - <
|
20
|
+
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '3.5'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 3.3.0
|
30
|
-
- - <
|
30
|
+
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '3.5'
|
33
33
|
description: Susy is a toolkit for building layouts of all types with a simple, natural
|
@@ -42,6 +42,10 @@ extra_rdoc_files:
|
|
42
42
|
- README.md
|
43
43
|
- lib/susy.rb
|
44
44
|
files:
|
45
|
+
- CHANGELOG.md
|
46
|
+
- LICENSE.txt
|
47
|
+
- README.md
|
48
|
+
- VERSION
|
45
49
|
- lib/compass-susy.rb
|
46
50
|
- lib/susy.rb
|
47
51
|
- sass/_prefix.scss
|
@@ -56,41 +60,38 @@ files:
|
|
56
60
|
- sass/susy/_api.scss
|
57
61
|
- sass/susy/_grids.scss
|
58
62
|
- sass/susy/_parser.scss
|
63
|
+
- sass/susy/_plugin-helpers.scss
|
59
64
|
- sass/susy/_settings.scss
|
60
65
|
- sass/susy/_unprefix.scss
|
61
66
|
- sass/susy/_utilities.scss
|
62
67
|
- sass/susy/_validation.scss
|
63
|
-
- CHANGELOG.md
|
64
|
-
- LICENSE.txt
|
65
|
-
- README.md
|
66
|
-
- VERSION
|
67
68
|
homepage: http://susy.oddbird.net/
|
68
69
|
licenses:
|
69
70
|
- BSD-3-Clause
|
70
71
|
metadata: {}
|
71
72
|
post_install_message:
|
72
73
|
rdoc_options:
|
73
|
-
- --line-numbers
|
74
|
-
- --inline-source
|
75
|
-
- --title
|
74
|
+
- "--line-numbers"
|
75
|
+
- "--inline-source"
|
76
|
+
- "--title"
|
76
77
|
- Susy
|
77
|
-
- --main
|
78
|
+
- "--main"
|
78
79
|
- README.md
|
79
80
|
require_paths:
|
80
81
|
- lib
|
81
82
|
required_ruby_version: !ruby/object:Gem::Requirement
|
82
83
|
requirements:
|
83
|
-
- -
|
84
|
+
- - ">="
|
84
85
|
- !ruby/object:Gem::Version
|
85
86
|
version: '0'
|
86
87
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
88
|
requirements:
|
88
|
-
- -
|
89
|
+
- - ">="
|
89
90
|
- !ruby/object:Gem::Version
|
90
91
|
version: '1.2'
|
91
92
|
requirements: []
|
92
93
|
rubyforge_project: susy
|
93
|
-
rubygems_version: 2.
|
94
|
+
rubygems_version: 2.6.10
|
94
95
|
signing_key:
|
95
96
|
specification_version: 3
|
96
97
|
summary: Responsive layout toolkit for Sass.
|