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,76 @@
|
|
|
1
|
+
@function __includes($collection, $target: null, $from-index: 1) {
|
|
2
|
+
@if __is-string($collection) {
|
|
3
|
+
@if not __is-number($from-index)
|
|
4
|
+
or -$from-index >= str-length($collection) {
|
|
5
|
+
$from-index: 0;
|
|
6
|
+
} @else if $from-index < 0 {
|
|
7
|
+
$from-index: str-length($collection) + $from-index;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
$collection: str-slice($collection, $from-index);
|
|
11
|
+
|
|
12
|
+
@return if(str-index($collection, __to-string($target)), true, false);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
$collection: __to-list($collection);
|
|
16
|
+
$length: if($collection, length($collection), 0);
|
|
17
|
+
|
|
18
|
+
@if not __is-length($length) {
|
|
19
|
+
$collection: __values($collection);
|
|
20
|
+
$length: length($collection);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@if __is-falsey($length) {
|
|
24
|
+
@return false;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@if __is-number($from-index) {
|
|
28
|
+
$from-index: if($from-index <= 0,
|
|
29
|
+
max($length + $from-index, 1),
|
|
30
|
+
$from-index);
|
|
31
|
+
} @else {
|
|
32
|
+
$from-index: 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@return __index-of($collection, $target, $from-index) > -1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
/// Checks if `$value` is in `$collection`.
|
|
40
|
+
/// If `$from-index` is negative, it is used as the offset from
|
|
41
|
+
/// the end of `$collection`.
|
|
42
|
+
///
|
|
43
|
+
///
|
|
44
|
+
/// @access public
|
|
45
|
+
/// @group Collection
|
|
46
|
+
/// @param {List|Map|string} $collection The collection to search.
|
|
47
|
+
/// @param {*} $target [null] - The value to search for.
|
|
48
|
+
/// @param {number} $from-index [1] - The index to search from.
|
|
49
|
+
/// @returns {boolean} Returns `true` if a matching element is found, else `false`.
|
|
50
|
+
/// @example scss
|
|
51
|
+
/// $foo: _includes((1, 2, 3), 1);
|
|
52
|
+
/// // => true
|
|
53
|
+
/// $foo: _includes((1, 2, 3), 1, 2);
|
|
54
|
+
/// // => false
|
|
55
|
+
/// $foo: _includes(( 'user': 'fred', 'age': 40 ), 'fred');
|
|
56
|
+
/// // => true
|
|
57
|
+
/// $foo: _includes('pebbles', 'eb');
|
|
58
|
+
/// // => true
|
|
59
|
+
|
|
60
|
+
@function _includes($args...) {
|
|
61
|
+
@return call('__includes', $args...);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/// @alias _includes
|
|
66
|
+
|
|
67
|
+
@function _include($args...) {
|
|
68
|
+
@return call('__includes', $args...);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/// @alias _includes
|
|
73
|
+
|
|
74
|
+
@function _contains($args...) {
|
|
75
|
+
@return call('__includes', $args...);
|
|
76
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@function __index-by-aggregator($result, $value, $key, $args...) {
|
|
2
|
+
@return __set($result, $key, $value);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@function __index-by($arguments...) {
|
|
7
|
+
$function: __create-aggregator('__index-by-aggregator');
|
|
8
|
+
|
|
9
|
+
@return __exec($function, $arguments...);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
/// Creates a map composed of keys generated from the results of running
|
|
14
|
+
/// each element of `$collection` through `$iteratee`. The corresponding value
|
|
15
|
+
/// of each key is the last element responsible for generating the key. The
|
|
16
|
+
/// iteratee function is bound to `$this-arg` and invoked with three arguments;
|
|
17
|
+
/// (value, index|key, collection).
|
|
18
|
+
///
|
|
19
|
+
/// If a property name is provided for `$predicate` the created `_property`
|
|
20
|
+
/// style callback returns the property value of the given element.
|
|
21
|
+
///
|
|
22
|
+
/// If a value is also provided for `$this-arg` the created `_matches-property`
|
|
23
|
+
/// style callback returns `true` for elements that have a matching property
|
|
24
|
+
/// value, else `false`.
|
|
25
|
+
///
|
|
26
|
+
/// If a map is provided for `$predicate` the created `_matches` style
|
|
27
|
+
/// callback returns `true` for elements that have the properties of the given
|
|
28
|
+
/// object, else `false`.
|
|
29
|
+
///
|
|
30
|
+
///
|
|
31
|
+
/// @access public
|
|
32
|
+
/// @group Collection
|
|
33
|
+
/// @param {List|Map|string} $collection The collection to iterate over.
|
|
34
|
+
/// @param {Function|Map|string} $iteratee [_identity] - The function invoked
|
|
35
|
+
/// per iteration.
|
|
36
|
+
/// @param {*} $this-arg [null] - The `_this` binding of `$iteratee`.
|
|
37
|
+
/// @returns {Map} Returns the composed aggregate object.
|
|
38
|
+
/// @example scss
|
|
39
|
+
/// // todo
|
|
40
|
+
|
|
41
|
+
@function _index-by($args...) {
|
|
42
|
+
@return call('__index-by', $args...);
|
|
43
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
@function __string-index-of($string, $target, $position: 0) {
|
|
2
|
+
$string: str-slice($string, $position);
|
|
3
|
+
$string-index: str-index($string, $target);
|
|
4
|
+
|
|
5
|
+
@if not $string-index {
|
|
6
|
+
@return -1;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@return $string-index + $position - 1;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@function __string-last-index-of($string, $target, $position: 0) {
|
|
14
|
+
$current-index: __string-index-of($string, $target, $position);
|
|
15
|
+
$last-index: -1;
|
|
16
|
+
|
|
17
|
+
@while $current-index != -1 {
|
|
18
|
+
$last-index: $current-index;
|
|
19
|
+
$current-index: __string-index-of($string, $target, $last-index + 1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@return $last-index;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@function __base-index-of($list, $value, $from-index: 1) {
|
|
27
|
+
$length: length($list);
|
|
28
|
+
$index: $from-index;
|
|
29
|
+
|
|
30
|
+
@if __is-falsey($index) {
|
|
31
|
+
$index: 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@while $index <= $length {
|
|
35
|
+
@if nth($list, $index) == $value {
|
|
36
|
+
@return $index;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
$index: $index + 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@return -1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@function __index-of($list, $value: $__undefined__, $from-index: 1) {
|
|
47
|
+
$length: if($list, length($list), 0);
|
|
48
|
+
|
|
49
|
+
@if ($length == 0) {
|
|
50
|
+
@return -1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@if __is-number($from-index) {
|
|
54
|
+
$from-index: if($from-index < 0, max($length + $from-index, 0), $from-index);
|
|
55
|
+
} @else if not (__is-falsey($from-index)) {
|
|
56
|
+
$index: __binary-index($list, $value);
|
|
57
|
+
$other: nth($list, $index);
|
|
58
|
+
|
|
59
|
+
@return if($value == $other, $index, -1);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@return __base-index-of($list, $value, $from-index);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
@function __last-index-of($list, $value: null, $from-index: length($list)) {
|
|
67
|
+
$length: if($list, length($list), 0);
|
|
68
|
+
|
|
69
|
+
@if (__is-falsey($length)) {
|
|
70
|
+
@return -1;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
$index: $length;
|
|
74
|
+
|
|
75
|
+
@if __is-number($from-index) {
|
|
76
|
+
$index: if($from-index < 0, max($length + $from-index, 0), min($from-index - 1, $length - 1)) + 1;
|
|
77
|
+
} @else if not (__is-falsey($from-index)) {
|
|
78
|
+
$index: __binary-index($list, $value, true) - 1;
|
|
79
|
+
|
|
80
|
+
$other: nth($list, $index);
|
|
81
|
+
|
|
82
|
+
@return if($value == other, $index, -1);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@while ($index > 0) {
|
|
86
|
+
@if (nth($list, $index) == $value) {
|
|
87
|
+
@return $index;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
$index: $index - 1;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@return -1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
/// Gets the index at which the first occurrence of `$value` is found in `$list`.
|
|
98
|
+
/// If `$from-index` is negative,
|
|
99
|
+
/// it is used as the offset from the end of `$list`. If `$list` is sorted
|
|
100
|
+
/// providing `true` for `$from-index` performs a faster binary search.
|
|
101
|
+
///
|
|
102
|
+
///
|
|
103
|
+
/// @access public
|
|
104
|
+
/// @group List
|
|
105
|
+
/// @param {List} $list The list to search.
|
|
106
|
+
/// @param {*} $value The value to search for.
|
|
107
|
+
/// @param {boolean|number} $from-index [1] - The index to search from or `true`
|
|
108
|
+
/// to perform a binary search on a sorted list.
|
|
109
|
+
/// @returns {number} Returns the index of the matched value, else `-1`.
|
|
110
|
+
/// @example scss
|
|
111
|
+
/// $foo: _index-of((1, 2, 1, 2), 2);
|
|
112
|
+
/// // => 2
|
|
113
|
+
///
|
|
114
|
+
/// // using `$from-index`
|
|
115
|
+
/// $foo: _index-of((1, 2, 1, 2), 2, 3);
|
|
116
|
+
/// // => 4
|
|
117
|
+
///
|
|
118
|
+
/// // performing a binary search
|
|
119
|
+
/// $foo: _index-of((1, 1, 2, 2), 3, true);
|
|
120
|
+
/// // => 3
|
|
121
|
+
|
|
122
|
+
@function _index-of($args...) {
|
|
123
|
+
@return call('__index-of', $args...);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
/// This method is like `_index-of` except that it iterates over elements of
|
|
128
|
+
/// `$list` from right to left.
|
|
129
|
+
///
|
|
130
|
+
///
|
|
131
|
+
/// @access public
|
|
132
|
+
/// @group List
|
|
133
|
+
/// @param {List} $list The list to search.
|
|
134
|
+
/// @param {*} $value The value to search for.
|
|
135
|
+
/// @param {boolean|number} $from-index [length($list)] - The index to search from
|
|
136
|
+
/// or `true` to perform a binary search on a sorted list.
|
|
137
|
+
/// @returns {number} Returns the index of the matched value, else `-1`.
|
|
138
|
+
/// @example scss
|
|
139
|
+
/// $foo: _last-index-of((1, 2, 1, 2), 2);
|
|
140
|
+
/// // => 4
|
|
141
|
+
///
|
|
142
|
+
/// // using `$from-index`
|
|
143
|
+
/// $foo: _last-index-of((1, 2, 1, 2), 2, 2);
|
|
144
|
+
/// // => 2
|
|
145
|
+
///
|
|
146
|
+
/// // performing a binary search
|
|
147
|
+
/// $foo: _last-index-of((1, 1, 2, 2), 2, true);
|
|
148
|
+
/// // => 4
|
|
149
|
+
|
|
150
|
+
@function _last-index-of($args...) {
|
|
151
|
+
@return call('__last-index-of', $args...);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@function __initial($list, $args...) {
|
|
2
|
+
@return __drop-right($list, 1);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/// Gets all but the last element of `$list`.
|
|
7
|
+
///
|
|
8
|
+
///
|
|
9
|
+
/// @access public
|
|
10
|
+
/// @group List
|
|
11
|
+
/// @param {List} $list The list to query.
|
|
12
|
+
/// @returns {List} Returns the slice of `$list`.
|
|
13
|
+
/// @example scss
|
|
14
|
+
/// _initial((1, 2, 3));
|
|
15
|
+
/// // => (1, 2)
|
|
16
|
+
|
|
17
|
+
@function _initial($args...) {
|
|
18
|
+
@return call('__initial', $args...);
|
|
19
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@function __intersection($arguments...) {
|
|
2
|
+
$args: ();
|
|
3
|
+
|
|
4
|
+
@each $arg-value in $arguments {
|
|
5
|
+
@if __is-list-like($arg-value) {
|
|
6
|
+
$args: append($args, $arg-value);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
$args-length: length($args);
|
|
11
|
+
$list: nth($args, 1);
|
|
12
|
+
$result: ();
|
|
13
|
+
$seen: false;
|
|
14
|
+
$continue-outer: false;
|
|
15
|
+
|
|
16
|
+
@each $value in $list {
|
|
17
|
+
$continue-outer: false;
|
|
18
|
+
|
|
19
|
+
@if (if($seen,
|
|
20
|
+
__cache-index-of($seen, $value),
|
|
21
|
+
__index-of($result, $value)) < 0) {
|
|
22
|
+
$args-index: $args-length;
|
|
23
|
+
|
|
24
|
+
@while ($args-index > 0 and not $continue-outer) {
|
|
25
|
+
@if __index-of(nth($args, $args-index), $value) < 0 {
|
|
26
|
+
$continue-outer: true;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@if not ($continue-outer) {
|
|
30
|
+
@if $seen {
|
|
31
|
+
$seen: append($seen, $value);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
$result: append($result, $value);
|
|
35
|
+
$args-index: $args-index - 1;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@return __base-uniq($result);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/// Creates a list of unique values in all provided lists
|
|
46
|
+
/// for equality comparisons.
|
|
47
|
+
///
|
|
48
|
+
///
|
|
49
|
+
/// @access public
|
|
50
|
+
/// @group List
|
|
51
|
+
/// @param {List...} $lists... The lists to inspect.
|
|
52
|
+
/// @returns {List} Returns the new list of shared values.
|
|
53
|
+
/// @example scss
|
|
54
|
+
/// $foo: _intersection((1, 2), (4, 2), (2, 1));
|
|
55
|
+
/// // => (2,)
|
|
56
|
+
|
|
57
|
+
@function _intersection($args...) {
|
|
58
|
+
@return call('__intersection', $args...);
|
|
59
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@function __invert($map, $multi-value: false, $guard: false) {
|
|
2
|
+
@if $guard and __is-iteratee-call($map, $multi-value, $guard) {
|
|
3
|
+
$multi-value: null;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
$props: __keys($map);
|
|
7
|
+
$result: ();
|
|
8
|
+
|
|
9
|
+
@each $key in $props {
|
|
10
|
+
$value: __get($map, $key);
|
|
11
|
+
|
|
12
|
+
@if ($multi-value) {
|
|
13
|
+
@if (map-has-key($result, $value)) {
|
|
14
|
+
$result: __set($result, $value, append(__get($result, $value), $key));
|
|
15
|
+
} @else {
|
|
16
|
+
$result: __set($result, $value, ($key,));
|
|
17
|
+
}
|
|
18
|
+
} @else {
|
|
19
|
+
$result: __set($result, $value, $key);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@return $result;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/// Creates a map composed of the inverted keys and values of `$map`.
|
|
28
|
+
/// If `$map` contains duplicate values, subsequent values overwrite property
|
|
29
|
+
/// assignments of previous values unless `multiValue` is `true`.
|
|
30
|
+
///
|
|
31
|
+
///
|
|
32
|
+
/// @access public
|
|
33
|
+
/// @group Map
|
|
34
|
+
/// @param {Map} $map The map to invert.
|
|
35
|
+
/// @param {boolean} $multi-value [false] Allow multiple values per key.
|
|
36
|
+
/// @returns {Map} Returns the new inverted map.
|
|
37
|
+
/// @example scss
|
|
38
|
+
/// $map: ( 'a': 1, 'b': 2, 'c': 1 );
|
|
39
|
+
/// $foo: _invert($map);
|
|
40
|
+
/// // => ( '1': 'c', '2': 'b' )
|
|
41
|
+
///
|
|
42
|
+
/// // with `$multi-value`
|
|
43
|
+
/// $foo: _invert($map, true);
|
|
44
|
+
/// // => ( '1': ('a', 'c'), '2': ('b',) )
|
|
45
|
+
|
|
46
|
+
@function _invert($args...) {
|
|
47
|
+
@return call('__invert', $args...);
|
|
48
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
@function __base-invoke-iteratee($value, $index, $collection) {
|
|
2
|
+
$function: __this('function');
|
|
3
|
+
$args: __this('args');
|
|
4
|
+
$index: __this('index');
|
|
5
|
+
$result: null;
|
|
6
|
+
|
|
7
|
+
@if __is-native($function) {
|
|
8
|
+
$result: __exec($function, $value);
|
|
9
|
+
} @else {
|
|
10
|
+
$result: __exec($function, $value, $index, $collection, $args...);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
$_: __this('result', append(__this('result'), $result));
|
|
14
|
+
$_: __this('index', __this('index') + 1);
|
|
15
|
+
|
|
16
|
+
@return true;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@function __base-invoke($collection, $method-name, $args...) {
|
|
21
|
+
$index: 1;
|
|
22
|
+
$is-func: __function-exists($method-name);
|
|
23
|
+
$length: if(__is-map-like($collection), length($collection), 0);
|
|
24
|
+
$result: ();
|
|
25
|
+
$function: if($is-func,
|
|
26
|
+
$method-name,
|
|
27
|
+
if($value != null, __get($value, $method-name), false));
|
|
28
|
+
|
|
29
|
+
@if $length == 0 {
|
|
30
|
+
@return $result;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
$_: __scope((
|
|
34
|
+
'result': $result,
|
|
35
|
+
'function': $function,
|
|
36
|
+
'args': $args,
|
|
37
|
+
'index': $index
|
|
38
|
+
));
|
|
39
|
+
$iteratee: __bind('__base-invoke-iteratee');
|
|
40
|
+
$_: __base-each($collection, $iteratee);
|
|
41
|
+
$result: __this('result');
|
|
42
|
+
$_: __scope(false);
|
|
43
|
+
|
|
44
|
+
@return $result;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@function __invoke($collection, $method-name: '__identity', $args...) {
|
|
49
|
+
@return __base-invoke($collection, $method-name, $args...);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/// Invokes the method named by `$method-name` on each element in `$collection`,
|
|
54
|
+
/// returning a list of the results of each invoked method. Any additional
|
|
55
|
+
/// arguments are provided to each invoked method. If `$method-name` is a function
|
|
56
|
+
/// it is invoked for, and `$this` bound to, each element in `$collection`.
|
|
57
|
+
///
|
|
58
|
+
///
|
|
59
|
+
/// @access public
|
|
60
|
+
/// @group Collection
|
|
61
|
+
/// @param {List|Map|string} $collection The collection to iterate over.
|
|
62
|
+
/// @param {Function|string} $method-name The name of the method to invoke or
|
|
63
|
+
/// the function invoked per iteration.
|
|
64
|
+
/// @param {Any...} $args... The arguments to invoke the method with.
|
|
65
|
+
/// @returns {List} Returns the list of results.
|
|
66
|
+
/// @example scss
|
|
67
|
+
/// $foo: _invoke(((5, 1, 7), (3, 2, 1)), '_sort');
|
|
68
|
+
/// // => ((1, 5, 7), (1, 2, 3))
|
|
69
|
+
/// $foo: _invoke((123, 456), '_split', '');
|
|
70
|
+
/// // => (('1', '2', '3'), ('4', '5', '6'))
|
|
71
|
+
|
|
72
|
+
@function _invoke($args...) {
|
|
73
|
+
@return call('__invoke', $args...);
|
|
74
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@function __is-empty($value: null) {
|
|
2
|
+
@if ($value == null) {
|
|
3
|
+
@return true;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
@if (__is-string($value)) {
|
|
7
|
+
@return str-length($value) == 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@if (__is-map-like($value)) {
|
|
11
|
+
@return length($value) == 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@if (__is-boolean($value)) {
|
|
15
|
+
@return true;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@return not __length(__keys($value));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
/// Checks if a value is empty.
|
|
23
|
+
///
|
|
24
|
+
///
|
|
25
|
+
/// @access public
|
|
26
|
+
/// @group Lang
|
|
27
|
+
/// @param {List|Map|string} $value The value to inspect.
|
|
28
|
+
/// @returns {boolean} Returns `true` if `$value` is empty, else `false`.
|
|
29
|
+
/// @example scss
|
|
30
|
+
/// $foo: _is-empty(null);
|
|
31
|
+
/// // => true
|
|
32
|
+
///
|
|
33
|
+
/// $foo: _is-empty(true);
|
|
34
|
+
/// // => true
|
|
35
|
+
///
|
|
36
|
+
/// $foo: _is-empty(1);
|
|
37
|
+
/// // => true
|
|
38
|
+
///
|
|
39
|
+
/// $foo: _is-empty((1, 2, 3));
|
|
40
|
+
/// // => false
|
|
41
|
+
///
|
|
42
|
+
/// $foo: _is-empty(( 'a': 1 ));
|
|
43
|
+
/// // => false
|
|
44
|
+
///
|
|
45
|
+
|
|
46
|
+
@function _is-empty($args...) {
|
|
47
|
+
@return call('__is-empty', $args...);
|
|
48
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
@function __equal-lists($list, $other, $equal-func, $customizer, $is-where) {
|
|
2
|
+
$index: 1;
|
|
3
|
+
$list-length: length($list);
|
|
4
|
+
$other-length: length($other);
|
|
5
|
+
$result: true;
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@if not ($list-length == $other-length)
|
|
9
|
+
and not ($is-where and ($other-length > $list-length)) {
|
|
10
|
+
@return false;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@while ($result and ($index <= $list-length)) {
|
|
14
|
+
$list-value: nth($list, $index);
|
|
15
|
+
$other-value: nth($other, $index);
|
|
16
|
+
$result: $__undefined__;
|
|
17
|
+
|
|
18
|
+
@if ($customizer) {
|
|
19
|
+
$result: if($is-where,
|
|
20
|
+
__exec($customizer, $other-value, $list-value, $index),
|
|
21
|
+
__exec($customizer, $list-value, $other-value, $index));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@if (__is-undefined($result)) {
|
|
25
|
+
@if ($is-where) {
|
|
26
|
+
$other-index: $other-length;
|
|
27
|
+
$break: false;
|
|
28
|
+
|
|
29
|
+
@while ($other-index > 0 and not $break) {
|
|
30
|
+
$other-value: nth($other, $other-index);
|
|
31
|
+
$result: if($list-value == $other-value,
|
|
32
|
+
true,
|
|
33
|
+
__exec($equal-func, $list-value, $other-value, $customizer, $is-where));
|
|
34
|
+
|
|
35
|
+
@if ($result) {
|
|
36
|
+
$break: true;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
$other-index: $other-index - 1;
|
|
40
|
+
}
|
|
41
|
+
} @else {
|
|
42
|
+
$result: if(if($list-value, $list-value == $other-value, false),
|
|
43
|
+
true,
|
|
44
|
+
__exec($equal-func, $list-value, $other-value, $customizer, $is-where));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
$index: $index + 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@return if($result, true, false);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@function __equal-by-tag() {}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
@function __equal-maps($map, $other, $equal-func: false, $customizer: false, $is-where: false) {
|
|
59
|
+
$map-props: map-keys($map);
|
|
60
|
+
$map-length: length($map-props);
|
|
61
|
+
$other-props: map-keys($other);
|
|
62
|
+
$other-length: length($other-props);
|
|
63
|
+
|
|
64
|
+
@if ($map-length != $other-length) and not ($is-where) {
|
|
65
|
+
@return false;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
$has-ctor: false;
|
|
69
|
+
$index: 1;
|
|
70
|
+
|
|
71
|
+
@while ($index <= $map-length) {
|
|
72
|
+
$key: nth($map-props, $index);
|
|
73
|
+
$result: map-has-key($other, $key);
|
|
74
|
+
|
|
75
|
+
@if ($result) {
|
|
76
|
+
$map-value: __get($map, $key);
|
|
77
|
+
$other-value: __get($other, $key);
|
|
78
|
+
$result: $__undefined__;
|
|
79
|
+
|
|
80
|
+
@if ($customizer) {
|
|
81
|
+
$result: if($is-where,
|
|
82
|
+
__exec($customizer, $other-value, $map-value, $key),
|
|
83
|
+
__exec($customizer, $map-value, $other-value, $key));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@if (__is-undefined($result)) {
|
|
87
|
+
$result: if($map-value == $other-value,
|
|
88
|
+
true,
|
|
89
|
+
__exec($equal-func, $map-value, $other-value, $customizer, $is-where));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@if not ($result) {
|
|
94
|
+
@return false;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
$has-ctor: if($has-ctor, true, ($key == '_type'));
|
|
98
|
+
$index: $index + 1;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@if not ($has-ctor) {
|
|
102
|
+
// todo
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@return true;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
@function __base-is-equal($value, $other, $customizer: null, $is-where: null) {
|
|
110
|
+
@if $value == $other {
|
|
111
|
+
@return true;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@if __is-string($value) or not __is-iterable($value) {
|
|
115
|
+
@return false;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@return __base-is-equal-deep($value, $other, $customizer, $is-where);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
@function __base-is-equal-deep($value, $other, $customizer: null, $is-where: null) {
|
|
123
|
+
$func: if(__is-list-like($value), '__equal-lists', '__equal-maps');
|
|
124
|
+
|
|
125
|
+
@return __exec($func, $value, $other, '__base-is-equal', $customizer, $is-where);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
@function __is-equal($value, $other, $customizer: null, $this-arg: null) {
|
|
130
|
+
$customizer: if(__function-exists($customizer), __bind-callback($customizer, $this-arg, 3), false);
|
|
131
|
+
|
|
132
|
+
@if (not $customizer and __is-strict-comparable($value) and __is-strict-comparable($other)) {
|
|
133
|
+
@return ($value == $other) and (type-of($value) == type-of($other));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
$result: if($customizer, __exec($customizer, $value, $other), $__undefined__);
|
|
137
|
+
|
|
138
|
+
@return if(__is-undefined($result) or __is-null($result), __base-is-equal($value, $other, $customizer), ($result and true));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
/// Performs a deep comparison between two values to determine if they are
|
|
143
|
+
/// equivalent. If `$customizer` is provided it is invoked to compare values.
|
|
144
|
+
/// If `$customizer` returns `undefined` comparisons are handled by the method
|
|
145
|
+
/// instead. The `$customizer` is bound to `$this-arg` and invoked with three
|
|
146
|
+
/// arguments; (value, other, (index|key)).
|
|
147
|
+
///
|
|
148
|
+
///
|
|
149
|
+
/// @access public
|
|
150
|
+
/// @group Lang
|
|
151
|
+
/// @param {*} $value The value to compare.
|
|
152
|
+
/// @param {*} $other The other value to compare.
|
|
153
|
+
/// @param {Function} $customizer [null] The function to customize comparing values.
|
|
154
|
+
/// @param {*} $this-arg [null] - The `_this` binding of `$customizer`.
|
|
155
|
+
/// @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
156
|
+
/// @example scss
|
|
157
|
+
/// $object: ( 'user': 'fred' );
|
|
158
|
+
/// $other: ( 'user': 'fred' );
|
|
159
|
+
/// $foo: _is-equal($object, $other);
|
|
160
|
+
/// // => true
|
|
161
|
+
///
|
|
162
|
+
/// // using a customizer callback
|
|
163
|
+
/// // todo
|
|
164
|
+
|
|
165
|
+
@function _is-equal($args...) {
|
|
166
|
+
@return call('__is-equal', $args...);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
/// @alias _is-equal
|
|
171
|
+
|
|
172
|
+
@function _eq($args...) {
|
|
173
|
+
@return call('__is-equal', $args...);
|
|
174
|
+
}
|
|
175
|
+
|