|
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- @function susy-compile(
- $short,
- $config: null,
- $context-only: false
- ) {
-
- $config: if($config, susy-settings($config), susy-settings());
- $normal-config: susy-normalize($config);
-
-
- @if (type-of($short) != 'map') and (length($short) > 0) {
- $short: susy-parse($short, $context-only);
- }
-
- $normal-short: susy-normalize($short, $normal-config);
-
-
- @return map-merge($normal-config, $normal-short);
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- @function su-call(
- $name,
- $config
- ) {
- $grid-function-args: (
- 'su-span': ('span', 'columns', 'gutters', 'spread', 'container-spread', 'location'),
- 'su-gutter': ('columns', 'gutters', 'container-spread'),
- 'su-slice': ('span', 'columns', 'location'),
- );
-
- $args: map-get($grid-function-args, $name);
-
- @if not $args {
- $options: 'Try one of these: #{map-keys($grid-function-args)}';
- @return _susy-error(
- '#{$name} is not a public Su function. #{$options}',
- 'su-call');
- }
-
- $call: if(function-exists('get-function'), get-function($name), $name);
- $output: ();
-
- @each $arg in $args {
- $value: map-get($config, $arg);
- $output: if($value, map-merge($output, ($arg: $value)), $output);
- }
-
- @return call($call, $output...);
- }
|