]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Add contain helper from sassy lists
authorKevin Ball <kmball11@gmail.com>
Tue, 1 Aug 2017 18:12:20 +0000 (11:12 -0700)
committerKevin Ball <kmball11@gmail.com>
Tue, 1 Aug 2017 18:12:20 +0000 (11:12 -0700)
_vendor/sassy-lists/stylesheets/functions/_contain.scss [new file with mode: 0644]
gulp/config.js
gulp/tasks/customizer.js
scss/foundation.scss

diff --git a/_vendor/sassy-lists/stylesheets/functions/_contain.scss b/_vendor/sassy-lists/stylesheets/functions/_contain.scss
new file mode 100644 (file)
index 0000000..87d160b
--- /dev/null
@@ -0,0 +1,31 @@
+///
+/// Returns whether `$list` contains `$value`.
+///
+/// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-contain
+///
+/// @param {List}    $list  - list to check
+/// @param {*}       $value - value to look for
+///
+/// @example
+/// sl-contain(a b c, a)
+/// // true
+///
+/// @example
+/// sl-contain(a b c, z)
+/// // false
+///
+/// @return {Bool}
+///
+
+@function sl-contain($list, $value) {
+  @return not not index($list, $value);
+}
+
+///
+/// @requires sl-contain
+/// @alias sl-contain
+///
+@function sl-include($list, $value) {
+  @return sl-contain($list, $value);
+}
index 794d972fce585d96a8cf7dc4ecb13b0c14ec0e8e..1287a528adbec32f01ad4a3a9ce8ffb323553450 100644 (file)
@@ -27,6 +27,7 @@ module.exports = {
     'node_modules/@(normalize-scss)/sass/**/*.scss',
     'node_modules/@(sassy-lists)/stylesheets/helpers/_missing-dependencies.scss',
     'node_modules/@(sassy-lists)/stylesheets/helpers/_true.scss',
+    'node_modules/@(sassy-lists)/stylesheets/functions/_contain.scss',
     'node_modules/@(sassy-lists)/stylesheets/functions/_purge.scss',
     'node_modules/@(sassy-lists)/stylesheets/functions/_remove.scss',
     'node_modules/@(sassy-lists)/stylesheets/functions/_replace.scss',
index 3c390224e72e44ea718d87b66e5fc50fc4ae6901..4d41800f1ae3f441ba05b0d79f2d59fd4bb03cc9 100644 (file)
@@ -70,6 +70,7 @@ gulp.task('customizer:prepareSassDeps', function() {
       'node_modules/@(normalize-scss)/sass/**/*.scss',
       'node_modules/@(sassy-lists)/stylesheets/helpers/missing-dependencies',
       'node_modules/@(sassy-lists)/stylesheets/helpers/true',
+      'node_modules/@(sassy-lists)/stylesheets/functions/contain',
       'node_modules/@(sassy-lists)/stylesheets/functions/purge',
       'node_modules/@(sassy-lists)/stylesheets/functions/remove',
       'node_modules/@(sassy-lists)/stylesheets/functions/replace',
index d2a113985b1835c04964ae7e82674aa242657e54..a7f353262f137681bc486969013029ecfd2236c8 100644 (file)
@@ -9,6 +9,7 @@
 @import '../_vendor/normalize-scss/sass/normalize';
 @import '../_vendor/sassy-lists/stylesheets/helpers/missing-dependencies';
 @import '../_vendor/sassy-lists/stylesheets/helpers/true';
+@import '../_vendor/sassy-lists/stylesheets/functions/contain';
 @import '../_vendor/sassy-lists/stylesheets/functions/purge';
 @import '../_vendor/sassy-lists/stylesheets/functions/remove';
 @import '../_vendor/sassy-lists/stylesheets/functions/replace';