sugarcss 1.0.0
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 +7 -0
- data/lib/sugarcss.rb +30 -0
- data/stylesheets/_sugar.scss +4 -0
- data/stylesheets/sugar/_BEM.scss +101 -0
- data/stylesheets/sugar/_animations.scss +101 -0
- data/stylesheets/sugar/_clearfix.scss +56 -0
- data/stylesheets/sugar/_colors.scss +126 -0
- data/stylesheets/sugar/_effects.scss +65 -0
- data/stylesheets/sugar/_filters.scss +67 -0
- data/stylesheets/sugar/_forms.scss +13 -0
- data/stylesheets/sugar/_functions.scss +328 -0
- data/stylesheets/sugar/_helper-classes.scss +109 -0
- data/stylesheets/sugar/_helper-functions.scss +56 -0
- data/stylesheets/sugar/_helper-mixins.scss +383 -0
- data/stylesheets/sugar/_icons.scss +21 -0
- data/stylesheets/sugar/_images.scss +150 -0
- data/stylesheets/sugar/_lists.scss +148 -0
- data/stylesheets/sugar/_medias.scss +141 -0
- data/stylesheets/sugar/_reset.scss +38 -0
- data/stylesheets/sugar/_shapes.scss +528 -0
- data/stylesheets/sugar/_sugar.scss +606 -0
- data/stylesheets/sugar/_typo.scss +849 -0
- data/stylesheets/sugar/_units.scss +120 -0
- data/stylesheets/sugar/tools/_arrow.scss +70 -0
- data/stylesheets/sugar/tools/_blank.scss +0 -0
- data/stylesheets/sugar/tools/_list.scss +103 -0
- data/stylesheets/sugar/tools/_map.scss +93 -0
- data/stylesheets/sugar/tools/_math.scss +196 -0
- data/stylesheets/sugar/tools/_string.scss +65 -0
- data/stylesheets/sugar/vendors/animatecss/_animate.scss +1474 -0
- data/stylesheets/sugar/vendors/animatecss/_base.scss +31 -0
- data/stylesheets/sugar/vendors/animatecss/attention_seekers/_bounce.scss +26 -0
- data/stylesheets/sugar/vendors/animatecss/attention_seekers/_flash.scss +14 -0
- data/stylesheets/sugar/vendors/animatecss/attention_seekers/_jello.scss +34 -0
- data/stylesheets/sugar/vendors/animatecss/attention_seekers/_pulse.scss +20 -0
- data/stylesheets/sugar/vendors/animatecss/attention_seekers/_rubberBand.scss +34 -0
- data/stylesheets/sugar/vendors/animatecss/attention_seekers/_shake.scss +18 -0
- data/stylesheets/sugar/vendors/animatecss/attention_seekers/_swing.scss +27 -0
- data/stylesheets/sugar/vendors/animatecss/attention_seekers/_tada.scss +26 -0
- data/stylesheets/sugar/vendors/animatecss/attention_seekers/_wobble.scss +36 -0
- data/stylesheets/sugar/vendors/animatecss/bouncing_entrances/_bounceIn.scss +37 -0
- data/stylesheets/sugar/vendors/animatecss/bouncing_entrances/_bounceInDown.scss +32 -0
- data/stylesheets/sugar/vendors/animatecss/bouncing_entrances/_bounceInLeft.scss +32 -0
- data/stylesheets/sugar/vendors/animatecss/bouncing_entrances/_bounceInRight.scss +32 -0
- data/stylesheets/sugar/vendors/animatecss/bouncing_entrances/_bounceInUp.scss +32 -0
- data/stylesheets/sugar/vendors/animatecss/bouncing_exits/_bounceOut.scss +20 -0
- data/stylesheets/sugar/vendors/animatecss/bouncing_exits/_bounceOutDown.scss +20 -0
- data/stylesheets/sugar/vendors/animatecss/bouncing_exits/_bounceOutLeft.scss +16 -0
- data/stylesheets/sugar/vendors/animatecss/bouncing_exits/_bounceOutRight.scss +16 -0
- data/stylesheets/sugar/vendors/animatecss/bouncing_exits/_bounceOutUp.scss +20 -0
- data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeIn.scss +9 -0
- data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeInDown.scss +16 -0
- data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeInDownBig.scss +16 -0
- data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeInLeft.scss +16 -0
- data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeInLeftBig.scss +16 -0
- data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeInRight.scss +16 -0
- data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeInRightBig.scss +16 -0
- data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeInUp.scss +16 -0
- data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeInUpBig.scss +16 -0
- data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOut.scss +9 -0
- data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOutDown.scss +15 -0
- data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOutDownBig.scss +15 -0
- data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOutLeft.scss +15 -0
- data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOutLeftBig.scss +15 -0
- data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOutRight.scss +15 -0
- data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOutRightBig.scss +15 -0
- data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOutUp.scss +15 -0
- data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOutUpBig.scss +15 -0
- data/stylesheets/sugar/vendors/animatecss/flippers/_flip.scss +32 -0
- data/stylesheets/sugar/vendors/animatecss/flippers/_flipInX.scss +31 -0
- data/stylesheets/sugar/vendors/animatecss/flippers/_flipInY.scss +31 -0
- data/stylesheets/sugar/vendors/animatecss/flippers/_flipOutX.scss +21 -0
- data/stylesheets/sugar/vendors/animatecss/flippers/_flipOutY.scss +21 -0
- data/stylesheets/sugar/vendors/animatecss/lightspeed/_lightSpeedIn.scss +27 -0
- data/stylesheets/sugar/vendors/animatecss/lightspeed/_lightSpeedOut.scss +16 -0
- data/stylesheets/sugar/vendors/animatecss/rotating_entrances/_rotateIn.scss +18 -0
- data/stylesheets/sugar/vendors/animatecss/rotating_entrances/_rotateInDownLeft.scss +18 -0
- data/stylesheets/sugar/vendors/animatecss/rotating_entrances/_rotateInDownRight.scss +18 -0
- data/stylesheets/sugar/vendors/animatecss/rotating_entrances/_rotateInUpLeft.scss +18 -0
- data/stylesheets/sugar/vendors/animatecss/rotating_entrances/_rotateInUpRight.scss +18 -0
- data/stylesheets/sugar/vendors/animatecss/rotating_exits/_rotateOut.scss +17 -0
- data/stylesheets/sugar/vendors/animatecss/rotating_exits/_rotateOutDownLeft.scss +17 -0
- data/stylesheets/sugar/vendors/animatecss/rotating_exits/_rotateOutDownRight.scss +17 -0
- data/stylesheets/sugar/vendors/animatecss/rotating_exits/_rotateOutUpLeft.scss +17 -0
- data/stylesheets/sugar/vendors/animatecss/rotating_exits/_rotateOutUpRight.scss +17 -0
- data/stylesheets/sugar/vendors/animatecss/sliding_entrances/_slideInDown.scss +15 -0
- data/stylesheets/sugar/vendors/animatecss/sliding_entrances/_slideInLeft.scss +15 -0
- data/stylesheets/sugar/vendors/animatecss/sliding_entrances/_slideInRight.scss +15 -0
- data/stylesheets/sugar/vendors/animatecss/sliding_entrances/_slideInUp.scss +15 -0
- data/stylesheets/sugar/vendors/animatecss/sliding_exits/_slideOutDown.scss +15 -0
- data/stylesheets/sugar/vendors/animatecss/sliding_exits/_slideOutLeft.scss +15 -0
- data/stylesheets/sugar/vendors/animatecss/sliding_exits/_slideOutRight.scss +15 -0
- data/stylesheets/sugar/vendors/animatecss/sliding_exits/_slideOutUp.scss +15 -0
- data/stylesheets/sugar/vendors/animatecss/specials/_hinge.scss +29 -0
- data/stylesheets/sugar/vendors/animatecss/specials/_rollIn.scss +18 -0
- data/stylesheets/sugar/vendors/animatecss/specials/_rollOut.scss +17 -0
- data/stylesheets/sugar/vendors/animatecss/zooming_entrances/_zoomIn.scss +15 -0
- data/stylesheets/sugar/vendors/animatecss/zooming_entrances/_zoomInDown.scss +18 -0
- data/stylesheets/sugar/vendors/animatecss/zooming_entrances/_zoomInLeft.scss +18 -0
- data/stylesheets/sugar/vendors/animatecss/zooming_entrances/_zoomInRight.scss +18 -0
- data/stylesheets/sugar/vendors/animatecss/zooming_entrances/_zoomInUp.scss +18 -0
- data/stylesheets/sugar/vendors/animatecss/zooming_exits/_zoomOut.scss +19 -0
- data/stylesheets/sugar/vendors/animatecss/zooming_exits/_zoomOutDown.scss +19 -0
- data/stylesheets/sugar/vendors/animatecss/zooming_exits/_zoomOutLeft.scss +17 -0
- data/stylesheets/sugar/vendors/animatecss/zooming_exits/_zoomOutRight.scss +17 -0
- data/stylesheets/sugar/vendors/animatecss/zooming_exits/_zoomOutUp.scss +19 -0
- data/stylesheets/sugar/vendors/cssgram/_1977.scss +16 -0
- data/stylesheets/sugar/vendors/cssgram/_aden.scss +18 -0
- data/stylesheets/sugar/vendors/cssgram/_brooklyn.scss +17 -0
- data/stylesheets/sugar/vendors/cssgram/_cssgram.scss +18 -0
- data/stylesheets/sugar/vendors/cssgram/_earlybird.scss +17 -0
- data/stylesheets/sugar/vendors/cssgram/_gingham.scss +17 -0
- data/stylesheets/sugar/vendors/cssgram/_hudson.scss +18 -0
- data/stylesheets/sugar/vendors/cssgram/_inkwell.scss +11 -0
- data/stylesheets/sugar/vendors/cssgram/_lark.scss +21 -0
- data/stylesheets/sugar/vendors/cssgram/_lofi.scss +16 -0
- data/stylesheets/sugar/vendors/cssgram/_mayfair.scss +18 -0
- data/stylesheets/sugar/vendors/cssgram/_moon.scss +21 -0
- data/stylesheets/sugar/vendors/cssgram/_nashville.scss +22 -0
- data/stylesheets/sugar/vendors/cssgram/_perpetua.scss +17 -0
- data/stylesheets/sugar/vendors/cssgram/_reyes.scss +18 -0
- data/stylesheets/sugar/vendors/cssgram/_shared.scss +29 -0
- data/stylesheets/sugar/vendors/cssgram/_toaster.scss +17 -0
- data/stylesheets/sugar/vendors/cssgram/_walden.scss +18 -0
- data/stylesheets/sugar/vendors/cssgram/_xpro2.scss +17 -0
- data/stylesheets/sugar/vendors/fontawesome/_font-awesome.scss +2019 -0
- data/stylesheets/sugar/vendors/modularscale/_modular-scale-tests.scss +74 -0
- data/stylesheets/sugar/vendors/modularscale/_modular-scale.scss +18 -0
- data/stylesheets/sugar/vendors/modularscale/modular-scale/_calc.scss +17 -0
- data/stylesheets/sugar/vendors/modularscale/modular-scale/_function-list.scss +68 -0
- data/stylesheets/sugar/vendors/modularscale/modular-scale/_function.scss +55 -0
- data/stylesheets/sugar/vendors/modularscale/modular-scale/_generate-list.scss +103 -0
- data/stylesheets/sugar/vendors/modularscale/modular-scale/_pow.scss +40 -0
- data/stylesheets/sugar/vendors/modularscale/modular-scale/_ratios.scss +20 -0
- data/stylesheets/sugar/vendors/modularscale/modular-scale/_respond.scss +49 -0
- data/stylesheets/sugar/vendors/modularscale/modular-scale/_round-px.scss +6 -0
- data/stylesheets/sugar/vendors/modularscale/modular-scale/_sort-list.scss +93 -0
- data/stylesheets/sugar/vendors/modularscale/modular-scale/_tests.scss +22 -0
- data/stylesheets/sugar/vendors/sassdash/_sassdash.scss +6 -0
- data/stylesheets/sugar/vendors/sassdash/api/_add.scss +43 -0
- data/stylesheets/sugar/vendors/sassdash/api/_after.scss +66 -0
- data/stylesheets/sugar/vendors/sassdash/api/_ary.scss +43 -0
- data/stylesheets/sugar/vendors/sassdash/api/_assign.scss +113 -0
- data/stylesheets/sugar/vendors/sassdash/api/_at.scss +50 -0
- data/stylesheets/sugar/vendors/sassdash/api/_before.scss +64 -0
- data/stylesheets/sugar/vendors/sassdash/api/_bind.scss +46 -0
- data/stylesheets/sugar/vendors/sassdash/api/_call.scss +0 -0
- data/stylesheets/sugar/vendors/sassdash/api/_callback.scss +167 -0
- data/stylesheets/sugar/vendors/sassdash/api/_case.scss +179 -0
- data/stylesheets/sugar/vendors/sassdash/api/_chunk.scss +44 -0
- data/stylesheets/sugar/vendors/sassdash/api/_compact.scss +32 -0
- data/stylesheets/sugar/vendors/sassdash/api/_compare.scss +180 -0
- data/stylesheets/sugar/vendors/sassdash/api/_concat.scss +62 -0
- data/stylesheets/sugar/vendors/sassdash/api/_constant.scss +32 -0
- data/stylesheets/sugar/vendors/sassdash/api/_context.scss +51 -0
- data/stylesheets/sugar/vendors/sassdash/api/_count-by.scss +51 -0
- data/stylesheets/sugar/vendors/sassdash/api/_create.scss +78 -0
- data/stylesheets/sugar/vendors/sassdash/api/_debug.scss +26 -0
- data/stylesheets/sugar/vendors/sassdash/api/_declare.scss +46 -0
- data/stylesheets/sugar/vendors/sassdash/api/_defaults.scss +41 -0
- data/stylesheets/sugar/vendors/sassdash/api/_difference.scss +50 -0
- data/stylesheets/sugar/vendors/sassdash/api/_drop.scss +226 -0
- data/stylesheets/sugar/vendors/sassdash/api/_either.scss +42 -0
- data/stylesheets/sugar/vendors/sassdash/api/_encode.scss +42 -0
- data/stylesheets/sugar/vendors/sassdash/api/_ends-with.scss +76 -0
- data/stylesheets/sugar/vendors/sassdash/api/_escape.scss +39 -0
- data/stylesheets/sugar/vendors/sassdash/api/_every.scss +106 -0
- data/stylesheets/sugar/vendors/sassdash/api/_exec.scss +31 -0
- data/stylesheets/sugar/vendors/sassdash/api/_extrema.scss +224 -0
- data/stylesheets/sugar/vendors/sassdash/api/_fill.scss +74 -0
- data/stylesheets/sugar/vendors/sassdash/api/_filter.scss +112 -0
- data/stylesheets/sugar/vendors/sassdash/api/_find.scss +448 -0
- data/stylesheets/sugar/vendors/sassdash/api/_first.scss +29 -0
- data/stylesheets/sugar/vendors/sassdash/api/_flatten.scss +88 -0
- data/stylesheets/sugar/vendors/sassdash/api/_flow.scss +145 -0
- data/stylesheets/sugar/vendors/sassdash/api/_for.scss +325 -0
- data/stylesheets/sugar/vendors/sassdash/api/_functions.scss +42 -0
- data/stylesheets/sugar/vendors/sassdash/api/_group-by.scss +90 -0
- data/stylesheets/sugar/vendors/sassdash/api/_has.scss +30 -0
- data/stylesheets/sugar/vendors/sassdash/api/_identity.scss +20 -0
- data/stylesheets/sugar/vendors/sassdash/api/_includes.scss +76 -0
- data/stylesheets/sugar/vendors/sassdash/api/_index-by.scss +43 -0
- data/stylesheets/sugar/vendors/sassdash/api/_index-of.scss +154 -0
- data/stylesheets/sugar/vendors/sassdash/api/_initial.scss +19 -0
- data/stylesheets/sugar/vendors/sassdash/api/_intersection.scss +59 -0
- data/stylesheets/sugar/vendors/sassdash/api/_invert.scss +48 -0
- data/stylesheets/sugar/vendors/sassdash/api/_invoke.scss +74 -0
- data/stylesheets/sugar/vendors/sassdash/api/_is-empty.scss +48 -0
- data/stylesheets/sugar/vendors/sassdash/api/_is-equal.scss +175 -0
- data/stylesheets/sugar/vendors/sassdash/api/_is-match.scss +116 -0
- data/stylesheets/sugar/vendors/sassdash/api/_is-type.scss +479 -0
- data/stylesheets/sugar/vendors/sassdash/api/_join.scss +47 -0
- data/stylesheets/sugar/vendors/sassdash/api/_keys.scss +48 -0
- data/stylesheets/sugar/vendors/sassdash/api/_last.scss +21 -0
- data/stylesheets/sugar/vendors/sassdash/api/_map.scss +265 -0
- data/stylesheets/sugar/vendors/sassdash/api/_matches.scss +85 -0
- data/stylesheets/sugar/vendors/sassdash/api/_memoize.scss +105 -0
- data/stylesheets/sugar/vendors/sassdash/api/_merge.scss +148 -0
- data/stylesheets/sugar/vendors/sassdash/api/_modify.scss +17 -0
- data/stylesheets/sugar/vendors/sassdash/api/_module.scss +111 -0
- data/stylesheets/sugar/vendors/sassdash/api/_negate.scss +42 -0
- data/stylesheets/sugar/vendors/sassdash/api/_noop.scss +19 -0
- data/stylesheets/sugar/vendors/sassdash/api/_omit.scss +52 -0
- data/stylesheets/sugar/vendors/sassdash/api/_once.scss +27 -0
- data/stylesheets/sugar/vendors/sassdash/api/_pad.scss +121 -0
- data/stylesheets/sugar/vendors/sassdash/api/_pairs.scss +26 -0
- data/stylesheets/sugar/vendors/sassdash/api/_parse-int.scss +69 -0
- data/stylesheets/sugar/vendors/sassdash/api/_partial.scss +91 -0
- data/stylesheets/sugar/vendors/sassdash/api/_partition.scss +53 -0
- data/stylesheets/sugar/vendors/sassdash/api/_pick.scss +80 -0
- data/stylesheets/sugar/vendors/sassdash/api/_pluck.scss +27 -0
- data/stylesheets/sugar/vendors/sassdash/api/_property.scss +91 -0
- data/stylesheets/sugar/vendors/sassdash/api/_pull.scss +43 -0
- data/stylesheets/sugar/vendors/sassdash/api/_push.scss +27 -0
- data/stylesheets/sugar/vendors/sassdash/api/_rand.scss +79 -0
- data/stylesheets/sugar/vendors/sassdash/api/_range.scss +59 -0
- data/stylesheets/sugar/vendors/sassdash/api/_reduce.scss +146 -0
- data/stylesheets/sugar/vendors/sassdash/api/_reject.scss +68 -0
- data/stylesheets/sugar/vendors/sassdash/api/_repeat.scss +33 -0
- data/stylesheets/sugar/vendors/sassdash/api/_replace.scss +40 -0
- data/stylesheets/sugar/vendors/sassdash/api/_rest.scss +26 -0
- data/stylesheets/sugar/vendors/sassdash/api/_result.scss +48 -0
- data/stylesheets/sugar/vendors/sassdash/api/_reverse.scss +64 -0
- data/stylesheets/sugar/vendors/sassdash/api/_rules.scss +55 -0
- data/stylesheets/sugar/vendors/sassdash/api/_sample.scss +33 -0
- data/stylesheets/sugar/vendors/sassdash/api/_shuffle.scss +37 -0
- data/stylesheets/sugar/vendors/sassdash/api/_size.scss +37 -0
- data/stylesheets/sugar/vendors/sassdash/api/_slice.scss +60 -0
- data/stylesheets/sugar/vendors/sassdash/api/_some.scss +110 -0
- data/stylesheets/sugar/vendors/sassdash/api/_sort.scss +335 -0
- data/stylesheets/sugar/vendors/sassdash/api/_sorted-index.scss +135 -0
- data/stylesheets/sugar/vendors/sassdash/api/_splice.scss +45 -0
- data/stylesheets/sugar/vendors/sassdash/api/_split.scss +43 -0
- data/stylesheets/sugar/vendors/sassdash/api/_starts-with.scss +78 -0
- data/stylesheets/sugar/vendors/sassdash/api/_sum.scss +44 -0
- data/stylesheets/sugar/vendors/sassdash/api/_take.scss +211 -0
- data/stylesheets/sugar/vendors/sassdash/api/_times.scss +33 -0
- data/stylesheets/sugar/vendors/sassdash/api/_to-list.scss +52 -0
- data/stylesheets/sugar/vendors/sassdash/api/_to-string.scss +35 -0
- data/stylesheets/sugar/vendors/sassdash/api/_trim.scss +138 -0
- data/stylesheets/sugar/vendors/sassdash/api/_trunc.scss +92 -0
- data/stylesheets/sugar/vendors/sassdash/api/_unescape.scss +48 -0
- data/stylesheets/sugar/vendors/sassdash/api/_union.scss +19 -0
- data/stylesheets/sugar/vendors/sassdash/api/_uniq.scss +86 -0
- data/stylesheets/sugar/vendors/sassdash/api/_unique-id.scss +27 -0
- data/stylesheets/sugar/vendors/sassdash/api/_unzip.scss +77 -0
- data/stylesheets/sugar/vendors/sassdash/api/_values.scss +54 -0
- data/stylesheets/sugar/vendors/sassdash/api/_where.scss +28 -0
- data/stylesheets/sugar/vendors/sassdash/api/_without.scss +26 -0
- data/stylesheets/sugar/vendors/sassdash/api/_words.scss +50 -0
- data/stylesheets/sugar/vendors/sassdash/api/_xor.scss +35 -0
- data/stylesheets/sugar/vendors/sassdash/api/_zip.scss +80 -0
- data/stylesheets/sugar/vendors/sassdash/constants/_char.scss +97 -0
- data/stylesheets/sugar/vendors/sassdash/constants/_constructor.scss +1 -0
- data/stylesheets/sugar/vendors/sassdash/constants/_escapes.scss +26 -0
- data/stylesheets/sugar/vendors/sassdash/constants/_flags.scss +9 -0
- data/stylesheets/sugar/vendors/sassdash/constants/_global.scss +11 -0
- data/stylesheets/sugar/vendors/sassdash/constants/_module.scss +9 -0
- data/stylesheets/sugar/vendors/sassdash/constants/_native.scss +80 -0
- data/stylesheets/sugar/vendors/sassdash/constants/_number.scss +26 -0
- data/stylesheets/sugar/vendors/sassdash/constants/_trunc.scss +2 -0
- data/stylesheets/sugar/vendors/sassdash/constants/_units.scss +10 -0
- data/stylesheets/sugar/vendors/sassdash/helpers/_aggregator.scss +47 -0
- data/stylesheets/sugar/vendors/sassdash/helpers/_call.scss +77 -0
- data/stylesheets/sugar/vendors/sassdash/helpers/_chain.scss +37 -0
- data/stylesheets/sugar/vendors/sassdash/helpers/_char.scss +115 -0
- data/stylesheets/sugar/vendors/sassdash/helpers/_coercion.scss +90 -0
- data/stylesheets/sugar/vendors/sassdash/helpers/_compounder.scss +25 -0
- data/stylesheets/sugar/vendors/sassdash/helpers/_module.scss +8 -0
- data/stylesheets/sugar/vendors/sassdash/helpers/_number.scss +165 -0
- data/stylesheets/sugar/vendors/sassdash/helpers/_scope.scss +43 -0
- data/stylesheets/sugar/vendors/sassdash/static/_local.scss +268 -0
- data/stylesheets/sugar/vendors/sassdash/static/_module.scss +2 -0
- data/stylesheets/sugar/vendors/sassdash/static/_static.scss +84 -0
- metadata +334 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
@function __base-is-match($map, $props, $values, $strict-compare-flags: (), $customizer: false) {
|
|
2
|
+
$length: length($props);
|
|
3
|
+
$result: null;
|
|
4
|
+
|
|
5
|
+
@if ($map == null) {
|
|
6
|
+
@return if($length == 0 or $length == null, false, true);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
$index: 1;
|
|
10
|
+
$no-customizer: if($customizer, false, true);
|
|
11
|
+
|
|
12
|
+
@while ($index <= $length) {
|
|
13
|
+
@if if(($no-customizer and length($strict-compare-flags) > 0 and nth($strict-compare-flags, $index)),
|
|
14
|
+
(nth($values, $index) != __get($map, nth($props, $index))),
|
|
15
|
+
(not map-has-key($map, nth($props, $index)))) {
|
|
16
|
+
@return false;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
$index: $index + 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
$index: 1;
|
|
23
|
+
|
|
24
|
+
@while ($index <= $length) {
|
|
25
|
+
$key: nth($props, $index);
|
|
26
|
+
|
|
27
|
+
@if $no-customizer and nth($strict-compare-flags, $index) {
|
|
28
|
+
$result: map-has-key($map, $key);
|
|
29
|
+
} @else {
|
|
30
|
+
$map-value: __get($map, $key);
|
|
31
|
+
$src-value: nth($values, $index);
|
|
32
|
+
$result: if($customizer,
|
|
33
|
+
__exec($customizer, $map-value, $src-value, $key),
|
|
34
|
+
null);
|
|
35
|
+
|
|
36
|
+
@if ($result == null) {
|
|
37
|
+
$result: __call(__base-is-equal, null, $src-value, $map-value, $customizer, true);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@if (not $result) {
|
|
42
|
+
@return false;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
$index: $index + 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
@function __is-match($map, $source, $customizer: null, $this-arg: null) {
|
|
53
|
+
$props: __keys($source);
|
|
54
|
+
$length: length($props);
|
|
55
|
+
|
|
56
|
+
@if __is-falsey($map) {
|
|
57
|
+
@return __is-empty($source);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
$customizer: if(__is-function($customizer), __bind-callback($customizer, $this-arg, 3), false);
|
|
61
|
+
|
|
62
|
+
@if (not $customizer and $length == 1) {
|
|
63
|
+
$key: nth($props, 1);
|
|
64
|
+
$value: __get($source, $key);
|
|
65
|
+
|
|
66
|
+
@if (__is-strict-comparable($value)) {
|
|
67
|
+
@return if($map != null and $value == __get($map, $key), map-has-key($map, $key), false);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
$values: ();
|
|
72
|
+
$strict-compare-flags: ();
|
|
73
|
+
|
|
74
|
+
@while ($length > 0) {
|
|
75
|
+
$value: __get($source, nth($props, $length));
|
|
76
|
+
$values: __set($values, $length, $value);
|
|
77
|
+
$strict-compare-flags: __set($strict-compare-flags, $length, __is-strict-comparable($value));
|
|
78
|
+
$length: $length - 1;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
$values: __to-list($values);
|
|
82
|
+
$strict-compare-flags: __to-list($strict-compare-flags);
|
|
83
|
+
|
|
84
|
+
@return __base-is-match($map, $props, $values, $strict-compare-flags, $customizer);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
/// Performs a deep comparison between `$map` and `source` to determine if
|
|
89
|
+
/// `$map` contains equivalent property values. If `$customizer` is provided
|
|
90
|
+
/// it is invoked to compare values. If `$customizer` returns `undefined`
|
|
91
|
+
/// comparisons are handled by the method instead. The `$customizer` is bound
|
|
92
|
+
/// to `$this-arg` and invoked with three arguments; (value, other, index|key).
|
|
93
|
+
///
|
|
94
|
+
///
|
|
95
|
+
/// @access public
|
|
96
|
+
/// @group Lang
|
|
97
|
+
/// @param {Map} $map The map to inspect.
|
|
98
|
+
/// @param {Map} $source The map of property values to match.
|
|
99
|
+
/// @param {Function} $customizer [null] The function to customize comparing values.
|
|
100
|
+
/// @param {*} $this-arg [null] - The `_this` binding of `$customizer`.
|
|
101
|
+
/// @returns {boolean} Returns `true` if `$map` is a match, else `false`.
|
|
102
|
+
/// @example scss
|
|
103
|
+
/// $map: ( 'user': 'fred', 'age': 40 );
|
|
104
|
+
///
|
|
105
|
+
/// _is-match($map, ( 'age': 40 ));
|
|
106
|
+
/// // => true
|
|
107
|
+
///
|
|
108
|
+
/// _is-match($map, ( 'age': 36 ));
|
|
109
|
+
/// // => false
|
|
110
|
+
///
|
|
111
|
+
/// // using a customizer callback
|
|
112
|
+
/// // todo
|
|
113
|
+
|
|
114
|
+
@function _is-match($args...) {
|
|
115
|
+
@return call('__is-match', $args...);
|
|
116
|
+
}
|
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
@function __is-length($value) {
|
|
2
|
+
@return type-of($value) == 'number'
|
|
3
|
+
and $value > -1
|
|
4
|
+
and $value % 1 == 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@function __is-strict-comparable($value) {
|
|
9
|
+
@return not __is-map-like($value);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@function __is-iteratee-call($value: null, $index: null, $map: null, $args...) {
|
|
14
|
+
@if not __is-map-like($map)
|
|
15
|
+
or length($args) > 0 {
|
|
16
|
+
@return false;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
$type: type-of($index);
|
|
20
|
+
$prereq: false;
|
|
21
|
+
|
|
22
|
+
@if ($type == 'number') {
|
|
23
|
+
$length: length($map);
|
|
24
|
+
$prereq: (__is-length($length) and __is-index($index, $length));
|
|
25
|
+
} @else {
|
|
26
|
+
$prereq: ($type == 'string');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@return if($prereq, __get($map, $index) == $value, false);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@function __is-arglist($value, $args...) {
|
|
34
|
+
@return type-of($value) == 'arglist';
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@function __is-list($value, $args...) {
|
|
39
|
+
@return type-of($value) == 'list';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@function __is-boolean($value, $args...) {
|
|
44
|
+
@return type-of($value) == 'bool';
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@function __is-falsey($value) {
|
|
49
|
+
@if $value == null
|
|
50
|
+
or $value == ''
|
|
51
|
+
or $value == ""
|
|
52
|
+
or $value == $__undefined__
|
|
53
|
+
or $value == 0
|
|
54
|
+
or (
|
|
55
|
+
type-of($value) == 'number'
|
|
56
|
+
and unit($value) == '%'
|
|
57
|
+
and $value == 0%)
|
|
58
|
+
or not $value {
|
|
59
|
+
@return true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@return false;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
@function __is-truthy($value) {
|
|
67
|
+
@return $value and not __is-falsey($value);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
@function __is-finite($value, $args...) {
|
|
72
|
+
@return __is-number($value);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
@function __is-function($value, $args...) {
|
|
77
|
+
@return __function-exists($value);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
@function __is-map($value, $args...) {
|
|
82
|
+
@return type-of($value) == 'map';
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
@function __is-null($value, $args...) {
|
|
87
|
+
@return type-of($value) == 'null';
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
@function __is-number($value, $args...) {
|
|
92
|
+
@return type-of($value) == 'number';
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
@function __is-integer($value, $args...) {
|
|
97
|
+
@return __is-number($value) and round($value) == $value;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
@function __is-plain-map($value, $args...) {
|
|
102
|
+
@return (type-of($value) == 'map')
|
|
103
|
+
and not (map-has-key($value, '_type'));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
@function __is-string($value, $args...) {
|
|
108
|
+
@return type-of($value) == 'string';
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
@function __is-undefined($value, $args...) {
|
|
113
|
+
@return if(global-variable-exists('__undefined__'), $value == $__undefined__, false);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@function __is-index($value, $length: null) {
|
|
118
|
+
$value: __parse-float($value);
|
|
119
|
+
|
|
120
|
+
@return $value > 0
|
|
121
|
+
and $value % 1 == 0
|
|
122
|
+
and ($length == null or $value <= $length);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
@function __is-iterable($value, $args...) {
|
|
127
|
+
@return __is-map-like($value) or __is-string($value);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
@function __is-map-like($value, $args...) {
|
|
132
|
+
@return $value and index('map' 'list' 'arglist', type-of($value)) != null;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
@function __is-list-like($value, $args...) {
|
|
137
|
+
@return __is-list($value) or __is-arglist($value);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
@function __is-native($value, $args...) {
|
|
142
|
+
@return __is-function($value) and index(__const('NATIVE_FUNCTIONS'), $value) != null;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
@function __is-color($value, $args...) {
|
|
147
|
+
@return type-of($value) == 'color';
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
@function __is-time($value, $args...) {
|
|
152
|
+
@return type-of($value) == 'number' and index(__const('TIME_UNITS'), unit($value)) != null;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/// Checks if `$value` is an `Arglist`.
|
|
156
|
+
///
|
|
157
|
+
/// @access public
|
|
158
|
+
/// @group Lang
|
|
159
|
+
/// @param {*} $value The value to check.
|
|
160
|
+
/// @returns {boolean} Returns `true` if `$value` is an `Arglist`, else `false`.
|
|
161
|
+
/// @example scss
|
|
162
|
+
/// @function get-args($args...) {
|
|
163
|
+
/// @return $args;
|
|
164
|
+
/// }
|
|
165
|
+
///
|
|
166
|
+
/// $foo: _is-arglist(get-args(1, 2, 3));
|
|
167
|
+
/// // => true
|
|
168
|
+
///
|
|
169
|
+
/// $foo: _is-arglist((1, 2, 3));
|
|
170
|
+
/// // => false
|
|
171
|
+
|
|
172
|
+
@function _is-arglist($args...) {
|
|
173
|
+
@return call('__is-arglist', $args...);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/// Checks if `$value` is a `List`.
|
|
177
|
+
///
|
|
178
|
+
/// @access public
|
|
179
|
+
/// @group Lang
|
|
180
|
+
/// @param {*} $value The value to check.
|
|
181
|
+
/// @returns {boolean} Returns `true` if `$value` is a `List`, else `false`.
|
|
182
|
+
/// @example scss
|
|
183
|
+
///
|
|
184
|
+
/// $foo: _is-list(1 2 3);
|
|
185
|
+
/// // => true
|
|
186
|
+
///
|
|
187
|
+
/// $foo: _is-list((1, 2, 3));
|
|
188
|
+
/// // => true
|
|
189
|
+
|
|
190
|
+
@function _is-list($args...) {
|
|
191
|
+
@return call('__is-list', $args...);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/// Checks if `$value` is a `Boolean`.
|
|
195
|
+
///
|
|
196
|
+
/// @access public
|
|
197
|
+
/// @group Lang
|
|
198
|
+
/// @param {*} $value The value to check.
|
|
199
|
+
/// @returns {boolean} Returns `true` if `$value` is a `Boolean`, else `false`.
|
|
200
|
+
/// @example scss
|
|
201
|
+
///
|
|
202
|
+
/// $foo: _is-boolean(false);
|
|
203
|
+
/// // => true
|
|
204
|
+
///
|
|
205
|
+
/// $foo: _is-boolean(1 + 1 == 2);
|
|
206
|
+
/// // => true
|
|
207
|
+
///
|
|
208
|
+
/// $foo: _is-boolean(null);
|
|
209
|
+
/// // => false
|
|
210
|
+
|
|
211
|
+
@function _is-boolean($args...) {
|
|
212
|
+
@return call('__is-boolean', $args...);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/// Checks if `$value` is a standard Sass `Function` or a Sassdash
|
|
216
|
+
/// callback `Function`.
|
|
217
|
+
///
|
|
218
|
+
/// @access public
|
|
219
|
+
/// @group Lang
|
|
220
|
+
/// @param {*} $value The value to check.
|
|
221
|
+
/// @returns {boolean} Returns `true` if `$value` is a `Function`, else `false`.
|
|
222
|
+
/// @example scss
|
|
223
|
+
///
|
|
224
|
+
/// $foo: _is-function('lighten');
|
|
225
|
+
/// // => true
|
|
226
|
+
///
|
|
227
|
+
/// $foo: _is-function(_partial('lighten', #C0FF33));
|
|
228
|
+
/// // => true
|
|
229
|
+
///
|
|
230
|
+
/// $foo: _is-function('not-a-function');
|
|
231
|
+
/// // => false
|
|
232
|
+
|
|
233
|
+
@function _is-function($args...) {
|
|
234
|
+
@return call('__is-function', $args...);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/// Checks if `$value` is `null`.
|
|
238
|
+
///
|
|
239
|
+
/// @access public
|
|
240
|
+
/// @group Lang
|
|
241
|
+
/// @param {*} $value The value to check.
|
|
242
|
+
/// @returns {boolean} Returns `true` if `$value` is `null`, else `false`.
|
|
243
|
+
/// @example scss
|
|
244
|
+
///
|
|
245
|
+
/// $foo: _is-null(null);
|
|
246
|
+
/// // => true
|
|
247
|
+
///
|
|
248
|
+
/// $foo: _is-null(map-get(('a': 1), 'b'));
|
|
249
|
+
/// // => true
|
|
250
|
+
///
|
|
251
|
+
/// $foo: _is-null(false);
|
|
252
|
+
/// // => false
|
|
253
|
+
///
|
|
254
|
+
///
|
|
255
|
+
@function _is-null($args...) {
|
|
256
|
+
@return call('__is-null', $args...);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/// Checks if `$value` is a `Number`.
|
|
260
|
+
///
|
|
261
|
+
/// @access public
|
|
262
|
+
/// @group Lang
|
|
263
|
+
/// @param {*} $value The value to check.
|
|
264
|
+
/// @returns {boolean} Returns `true` if `$value` is a `Number`, else `false`.
|
|
265
|
+
/// @example scss
|
|
266
|
+
///
|
|
267
|
+
/// $foo: _is-number(30);
|
|
268
|
+
/// // => true
|
|
269
|
+
///
|
|
270
|
+
/// $foo: _is-number('30');
|
|
271
|
+
/// // => false
|
|
272
|
+
|
|
273
|
+
@function _is-number($args...) {
|
|
274
|
+
@return call('__is-number', $args...);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
/// Checks if `$value` is an integer number.
|
|
279
|
+
///
|
|
280
|
+
/// @access public
|
|
281
|
+
/// @group Lang
|
|
282
|
+
/// @param {*} $value The value to check.
|
|
283
|
+
/// @returns {boolean} Returns `true` if `$value` is an integer number, else `false`.
|
|
284
|
+
/// @example scss
|
|
285
|
+
///
|
|
286
|
+
/// $foo: _is-integer(31);
|
|
287
|
+
/// // => true
|
|
288
|
+
///
|
|
289
|
+
/// $foo: _is-integer('31');
|
|
290
|
+
/// // => false
|
|
291
|
+
///
|
|
292
|
+
/// $foo: _is-integer(31.25);
|
|
293
|
+
/// // => false
|
|
294
|
+
|
|
295
|
+
@function _is-integer($args...) {
|
|
296
|
+
@return call('__is-integer', $args...);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
/// Checks if `$value` is a `Map`.
|
|
301
|
+
///
|
|
302
|
+
/// @access public
|
|
303
|
+
/// @group Lang
|
|
304
|
+
/// @param {*} $value The value to check.
|
|
305
|
+
/// @returns {boolean} Returns `true` if `$value` is a `Map`, else `false`.
|
|
306
|
+
/// @example scss
|
|
307
|
+
///
|
|
308
|
+
/// $foo: _is-map(('a': 1));
|
|
309
|
+
/// // => true
|
|
310
|
+
///
|
|
311
|
+
/// $foo: _is-map(('a', 1));
|
|
312
|
+
/// // => false
|
|
313
|
+
|
|
314
|
+
@function _is-map($args...) {
|
|
315
|
+
@return call('__is-map', $args...);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
/// Checks if `$value` is a plain `Map`, not from a constructor.
|
|
320
|
+
///
|
|
321
|
+
/// @access public
|
|
322
|
+
/// @group Lang
|
|
323
|
+
/// @param {*} $value The value to check.
|
|
324
|
+
/// @returns {boolean} Returns `true` if `$value` is a plain `Map`, else `false`.
|
|
325
|
+
/// @example scss
|
|
326
|
+
/// // todo
|
|
327
|
+
|
|
328
|
+
@function _is-plain-map($args...) {
|
|
329
|
+
@return call('__is-plain-map', $args...);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
/// Checks if `$value` is a `String`.
|
|
334
|
+
///
|
|
335
|
+
/// @access public
|
|
336
|
+
/// @group Lang
|
|
337
|
+
/// @param {*} $value The value to check.
|
|
338
|
+
/// @returns {boolean} Returns `true` if `$value` is a `String`, else `false`.
|
|
339
|
+
/// @example scss
|
|
340
|
+
///
|
|
341
|
+
/// $foo: _is-string('hello');
|
|
342
|
+
/// // => true
|
|
343
|
+
///
|
|
344
|
+
/// $foo: _is-string(hello);
|
|
345
|
+
/// // => true
|
|
346
|
+
///
|
|
347
|
+
/// $foo: _is-string(31);
|
|
348
|
+
/// // => false
|
|
349
|
+
|
|
350
|
+
@function _is-string($args...) {
|
|
351
|
+
@return call('__is-string', $args...);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
/// Checks if `$value` is the Sassdash `undefined` value.
|
|
356
|
+
/// Using `undefined` (`$__undefined__`) can be useful in distinguishing
|
|
357
|
+
/// between `null` and undefined values.
|
|
358
|
+
///
|
|
359
|
+
/// @access public
|
|
360
|
+
/// @group Lang
|
|
361
|
+
/// @param {*} $value The value to check.
|
|
362
|
+
/// @returns {boolean} Returns `true` if `$value` is `undefined`, else `false`.
|
|
363
|
+
/// @example scss
|
|
364
|
+
/// // todo
|
|
365
|
+
|
|
366
|
+
@function _is-undefined($args...) {
|
|
367
|
+
@return call('__is-undefined', $args...);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
/// Checks if `$value` is iterable. A value in Sassdash is considered iterable
|
|
372
|
+
/// if it contains a distinct set of elements and acts as a container for these
|
|
373
|
+
/// elements - i.e. a `Map`, `List`, `Arglist`, or `String`.
|
|
374
|
+
///
|
|
375
|
+
/// @access public
|
|
376
|
+
/// @group Lang
|
|
377
|
+
/// @param {*} $value The value to check.
|
|
378
|
+
/// @returns {boolean} Returns `true` if `$value` is iterable, else `false`.
|
|
379
|
+
/// @example scss
|
|
380
|
+
///
|
|
381
|
+
/// $foo: _is-iterable('hello');
|
|
382
|
+
/// // => true
|
|
383
|
+
///
|
|
384
|
+
/// $foo: _is-iterable(1 2 3 4);
|
|
385
|
+
/// // => true
|
|
386
|
+
///
|
|
387
|
+
/// $foo: _is-iterable(('a': 1, 'b': 2));
|
|
388
|
+
/// // => true
|
|
389
|
+
///
|
|
390
|
+
/// $foo: _is-iterable(1234);
|
|
391
|
+
/// // => false
|
|
392
|
+
|
|
393
|
+
@function _is-iterable($args...) {
|
|
394
|
+
@return call('__is-iterable', $args...);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
/// Checks if `$value` is similar to a `Map`, in that it has
|
|
399
|
+
/// (implicit or explicit) keys bijectively paired with values.
|
|
400
|
+
/// In Sassdash, a `Map`, `List`, or `Arglist` can be considered map-like.
|
|
401
|
+
///
|
|
402
|
+
/// @access public
|
|
403
|
+
/// @group Lang
|
|
404
|
+
/// @param {*} $value The value to check.
|
|
405
|
+
/// @returns {boolean} Returns `true` if `$value` is similar to a `Map`, else `false`.
|
|
406
|
+
/// @example scss
|
|
407
|
+
///
|
|
408
|
+
/// $foo: _is-map-like(1 2 3 4);
|
|
409
|
+
/// // => true
|
|
410
|
+
///
|
|
411
|
+
/// $foo: _is-map-like(('a': 1, 'b': 2));
|
|
412
|
+
/// // => true
|
|
413
|
+
///
|
|
414
|
+
/// $foo: _is-map-like('1234');
|
|
415
|
+
/// // => false
|
|
416
|
+
|
|
417
|
+
@function _is-map-like($args...) {
|
|
418
|
+
@return call('__is-map-like', $args...);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
/// Checks if `$value` is a `List` or `Arglist`.
|
|
423
|
+
///
|
|
424
|
+
/// @access public
|
|
425
|
+
/// @group Lang
|
|
426
|
+
/// @param {*} $value The value to check.
|
|
427
|
+
/// @returns {boolean} Returns `true` if `$value` is a `List` or `Arglist`, else `false`.
|
|
428
|
+
/// @example scss
|
|
429
|
+
///
|
|
430
|
+
/// $foo: _is-list-like((1, 2));
|
|
431
|
+
/// // => true
|
|
432
|
+
|
|
433
|
+
@function _is-list-like($args...) {
|
|
434
|
+
@return call('__is-list-like', $args...);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
/// Checks if `$value` is a `Color`.
|
|
439
|
+
///
|
|
440
|
+
/// @access public
|
|
441
|
+
/// @group Lang
|
|
442
|
+
/// @param {*} $value The value to check.
|
|
443
|
+
/// @returns {boolean} Returns `true` if `$value` is a `Color`, else `false`.
|
|
444
|
+
/// @example scss
|
|
445
|
+
///
|
|
446
|
+
/// $foo: _is-color($C0FF33);
|
|
447
|
+
/// // => true
|
|
448
|
+
///
|
|
449
|
+
/// $foo: _is-color(green);
|
|
450
|
+
/// // => true
|
|
451
|
+
///
|
|
452
|
+
/// $foo: _is-color('green');
|
|
453
|
+
/// // => false
|
|
454
|
+
|
|
455
|
+
@function _is-color($args...) {
|
|
456
|
+
@return call('__is-color', $args...);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
/// Checks if `$value` is a Time value (i.e. seconds or milliseconds).
|
|
461
|
+
///
|
|
462
|
+
/// @access public
|
|
463
|
+
/// @group Lang
|
|
464
|
+
/// @param {*} $value The value to check.
|
|
465
|
+
/// @returns {boolean} Returns `true` if unit of numerical `$value` is 's' or 'ms', else `false`.
|
|
466
|
+
/// @example scss
|
|
467
|
+
///
|
|
468
|
+
/// $foo: _is-time(13s);
|
|
469
|
+
/// // => true
|
|
470
|
+
///
|
|
471
|
+
/// $foo: _is-time(0.3ms);
|
|
472
|
+
/// // => true
|
|
473
|
+
///
|
|
474
|
+
/// $foo: _is-time('13s');
|
|
475
|
+
/// // => false
|
|
476
|
+
|
|
477
|
+
@function _is-time($args...) {
|
|
478
|
+
@return call('__is-time', $args...);
|
|
479
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@function __list-join($list, $separator: '') {
|
|
2
|
+
$length: length($list);
|
|
3
|
+
|
|
4
|
+
@if ($length == 0) {
|
|
5
|
+
@return '';
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
$result: nth($list, 1);
|
|
9
|
+
|
|
10
|
+
@if $length > 1 {
|
|
11
|
+
@for $index from 2 through $length {
|
|
12
|
+
$result: $result + $separator + nth($list, $index);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@return $result;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@function __join($list, $separator: '', $guard: null) {
|
|
21
|
+
@if $guard and __is-iteratee-call($list, $separator, $guard) {
|
|
22
|
+
$separator: '';
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@if __is-list-like($separator) {
|
|
26
|
+
@return join($list, $separator);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@return __list-join($list, $separator);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/// Joins a single list into a string,
|
|
33
|
+
/// similar to the native JavaScript `Array.prototype.join()`.
|
|
34
|
+
///
|
|
35
|
+
/// **NOTE:** This is not the same as the native Sass `join()` function.
|
|
36
|
+
///
|
|
37
|
+
/// @access public
|
|
38
|
+
/// @group List
|
|
39
|
+
/// @param {List} $list The list containing elements to join.
|
|
40
|
+
/// @param {String} $separator [''] The string separator.
|
|
41
|
+
/// @returns {String} Returns the joined list as a string.
|
|
42
|
+
/// @example scss
|
|
43
|
+
/// $foo: _join('a' 'b' 'c', '--');
|
|
44
|
+
/// // => 'a--b--c'
|
|
45
|
+
@function _join($args...) {
|
|
46
|
+
@return call('__join', $args...);
|
|
47
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
|
|
2
|
+
@function __keys-in($map: null) {
|
|
3
|
+
@if __is-falsey($map) {
|
|
4
|
+
@return ();
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
$map: __to-map($map);
|
|
8
|
+
$skip-keys: __const('CONSTRUCTOR_KEYS');
|
|
9
|
+
|
|
10
|
+
@return __without(map-keys($map), $skip-keys...);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@function __keys($map: null) {
|
|
15
|
+
// currently the same as __keys-in
|
|
16
|
+
@return __keys-in($map);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
/// Creates a list of the own enumerable keys of `$map`.
|
|
21
|
+
///
|
|
22
|
+
///
|
|
23
|
+
/// @access public
|
|
24
|
+
/// @group Map
|
|
25
|
+
/// @param {Map} $map The map to inspect.
|
|
26
|
+
/// @returns {List} Returns the list of keys.
|
|
27
|
+
/// @example scss
|
|
28
|
+
/// // todo
|
|
29
|
+
|
|
30
|
+
@function _keys($args...) {
|
|
31
|
+
@return call('__keys', $args...);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
/// Creates a list of the own and inherited enumerable keys of `map`.
|
|
36
|
+
/// **Note:** Non-map values are coerced to maps.
|
|
37
|
+
///
|
|
38
|
+
///
|
|
39
|
+
/// @access public
|
|
40
|
+
/// @group Map
|
|
41
|
+
/// @param {Map} $map The map to inspect.
|
|
42
|
+
/// @returns {List} Returns the list of keys.
|
|
43
|
+
/// @example scss
|
|
44
|
+
/// // todo
|
|
45
|
+
|
|
46
|
+
@function _keys-in($args...) {
|
|
47
|
+
@return call('__keys-in', $args...);
|
|
48
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@function __last($list, $args...) {
|
|
2
|
+
$length: if($list, length($list), 0);
|
|
3
|
+
|
|
4
|
+
@return if(not __is-falsey($length), nth($list, $length), null);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
/// Gets the last element of `$list`.
|
|
9
|
+
///
|
|
10
|
+
///
|
|
11
|
+
/// @access public
|
|
12
|
+
/// @group List
|
|
13
|
+
/// @param {List} $list The list to query.
|
|
14
|
+
/// @returns {*} Returns the last element of `$list`.
|
|
15
|
+
/// @example scss
|
|
16
|
+
/// $foo: _last((1, 2, 3));
|
|
17
|
+
/// // => 3
|
|
18
|
+
|
|
19
|
+
@function _last($args...) {
|
|
20
|
+
@return call('__last', $args...);
|
|
21
|
+
}
|