Skip to content

Commit

Permalink
Add contain helper from sassy lists
Browse files Browse the repository at this point in the history
  • Loading branch information
kball committed Aug 1, 2017
1 parent bef50b6 commit 398f7a2
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
31 changes: 31 additions & 0 deletions _vendor/sassy-lists/stylesheets/functions/_contain.scss
Original file line number Diff line number Diff line change
@@ -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);
}
1 change: 1 addition & 0 deletions gulp/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions gulp/tasks/customizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions scss/foundation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 398f7a2

Please sign in to comment.