|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
-
-
-
-
-
-
-
-
-
-
-
-
- $_susy-error-output-override: false !default;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- @function _susy-error(
- $message,
- $source,
- $override: $_susy-error-output-override
- ) {
- @if $override {
- @return 'ERROR [#{$source}] #{$message}';
- }
-
- @error '[#{$source}] #{$message}';
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- @function _su-is-comparable(
- $lengths...
- ) {
- $first: nth($lengths, 1);
-
- @if (length($lengths) == 1) {
- @return if(unitless($first), 'fluid', 'static');
- }
-
- @for $i from 2 through length($lengths) {
- $comp: nth($lengths, $i);
-
- $fail: not comparable($first, $comp);
- $fail: $fail or (unitless($first) and not unitless($comp));
- $fail: $fail or (unitless($comp) and not unitless($first));
-
- @if $fail {
- @return false;
- }
- }
-
- @return if(unitless($first), 'fluid', 'static');
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- @function _su-map-add-units(
- $map,
- $value
- ) {
- $unit: $value * 0;
- $has: map-get($map, $unit) or 0;
-
- @if ($has == 0) {
- @each $try, $could in $map {
- $match: comparable($try, $value);
- $unit: if($match, $try, $unit);
- $has: if($match, $could, $has);
- }
- }
-
- @return map-merge($map, ($unit: $has + $value));
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- @function _susy-flatten(
- $list
- ) {
- $flat: ();
-
-
- @if (type-of($list) == 'map') {
- @return $list;
- }
-
-
- @each $item in $list {
- @if (type-of($item) == 'list') {
- $item: _susy-flatten($item);
- $flat: join($flat, $item);
- } @else {
- $flat: append($flat, $item);
- }
- }
-
-
- @return $flat;
- }
|