]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Remove -zf-get-options() function used by the grid, the build-in index() function...
authorGeoff Kimball <geoff@zurb.com>
Tue, 19 Jan 2016 20:00:23 +0000 (12:00 -0800)
committerGeoff Kimball <geoff@zurb.com>
Tue, 19 Jan 2016 20:00:23 +0000 (12:00 -0800)
scss/grid/_flex-grid.scss
scss/grid/_row.scss
scss/util/_value.scss

index 4931be47d4c4ee501b9af8638a5fd847d37c5066..87e87c84cc0457aa1194c9e973ac4f31b3f73967 100644 (file)
   $base: true,
   $gutter: $grid-column-gutter
 ) {
-  $behavior: -zf-get-options($behavior, nest collapse);
   $margin: auto;
 
-  @if map-get($behavior, nest) {
+  @if index($behavior, nest) != null {
     @include grid-row-nest($gutter);
 
-    @if map-get($behavior, collapse) {
+    @if index($behavior, collapse) != null {
       margin-left: 0;
       margin-right: 0;
     }
index 75467072c0bd3b6b703004feaa9af8bb27758b5f..dacdfafb83acbb4703ba36563b034849696407fa 100644 (file)
   $cf: true,
   $gutter: $grid-column-gutter
 ) {
-  $behavior: -zf-get-options($behavior, nest collapse);
   $margin: auto;
 
-  @if map-get($behavior, nest) {
+  @if index($behavior, nest) != null {
     @include grid-row-nest($gutter);
 
-    @if map-get($behavior, collapse) {
+    @if index($behavior, collapse) != null {
       margin-left: 0;
       margin-right: 0;
     }
index a2dadf8e55cac3f4bb063a7b80ddc67eb3514900..04e07c7b39c53ee22a5a402766b857058e0bd04a 100644 (file)
     }
     @return $map;
 }
-
-// TODO: Remove this (it's used by the grid but is overkill)
-/// Given a user-defined list of keywords and a list of possible keywords, find the ones that were passed in.
-/// @access private
-///
-/// @param {List} $opts - List of values to find keywords in.
-/// @param {List} $seeking - List of all possible keywords.
-///
-/// @returns {Map} A map of all keywords in $seeking. If a keyword was found in $opts, its value is true, otherwise false.
-@function -zf-get-options($opts, $seeking) {
-  @if type-of($opts) != 'list' {
-    $opts: ($opts);
-  }
-
-  $map: ();
-  @each $keyword in $seeking {
-    $val: if(index($opts, $keyword) != null, true, false);
-    $item: ($keyword: $val);
-    $map: map-merge($map, $item);
-  }
-
-  @return $map;
-}