]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
use get-color() in settings instead of map-get()
authorAndy Cochran <acochran@council.nyc.gov>
Mon, 5 Dec 2016 21:38:58 +0000 (16:38 -0500)
committerAndy Cochran <acochran@council.nyc.gov>
Mon, 5 Dec 2016 21:38:58 +0000 (16:38 -0500)
docs/pages/global.md
scss/_global.scss
scss/components/_menu.scss
scss/forms/_error.scss
scss/settings/_settings.scss

index c2f8228e544b286ca69d9be3cf6fd961b169f8a9..86276f13b96939ea7a1d52aff886fd127c1c4dc4 100644 (file)
@@ -96,11 +96,11 @@ $foundation-palette: (
 
 Using the above palette, we can add the `.mars`, `.saturn`, or `.neptune` classes to buttons, labels, badges, and more.
 
-To access the colors in your code, use Sass's `map-get()` function:
+To access the colors in your code, use Foundation's `get-color()` function:
 
 ```scss
 .mars {
-  color: map-get($foundation-palette, mars);
+  color: get-color(mars);
 }
 ```
 
index cb975302364139a81d4fc2b60cbb4b7634a1b7ac..65e459104cd496df5d9a7e003878893420383019 100644 (file)
@@ -103,11 +103,11 @@ $global-left: if($global-text-direction == rtl, right, left);
 $global-right: if($global-text-direction == rtl, left, right);
 
 // Internal variables used for colors
-$primary-color: map-get($foundation-palette, primary);
-$secondary-color: map-get($foundation-palette, secondary);
-$success-color: map-get($foundation-palette, success);
-$warning-color: map-get($foundation-palette, warning);
-$alert-color: map-get($foundation-palette, alert);
+$primary-color: get-color(primary);
+$secondary-color: get-color(secondary);
+$success-color: get-color(success);
+$warning-color: get-color(warning);
+$alert-color: get-color(alert);
 
 // Remove this in 6.3
 $-zf-menu-icon-imported: false;
index b53d67f5c41cb1d078cbf4aa403f0c0709290343..8534c04b350cb7444f6ead09c902b183b4174e0e 100644 (file)
@@ -24,7 +24,7 @@ $menu-item-color-active: $white !default;
 
 /// Background color of an active menu item.
 /// @type Color
-$menu-item-background-active: map-get($foundation-palette, primary) !default;
+$menu-item-background-active: get-color(primary) !default;
 
 /// Spacing between an icon and text in a menu item.
 /// @type Number
index 6a6c5397f3049f4f8adfcc012eb7ab5d54d33574..30e538913b5fcb99468d5513da6e2a589eb73535 100644 (file)
@@ -16,15 +16,15 @@ $abide-labels: true !default;
 
 /// Background color to use for invalid text inputs.
 /// @type Color
-$input-background-invalid: map-get($foundation-palette, alert) !default;
+$input-background-invalid: get-color(alert) !default;
 
 /// Color to use for labels of invalid inputs.
 /// @type Color
-$form-label-color-invalid: map-get($foundation-palette, alert) !default;
+$form-label-color-invalid: get-color(alert) !default;
 
 /// Default font color for form error text.
 /// @type Color
-$input-error-color: map-get($foundation-palette, alert) !default;
+$input-error-color: get-color(alert) !default;
 
 /// Default font size for form error text.
 /// @type Number
@@ -47,7 +47,7 @@ $input-error-font-weight: $global-weight-bold !default;
     background-color: mix($background, $white, $background-lighten);
     &::placeholder {
       color: $background;
-    }    
+    }
   }
 }
 
index 2c94c2f31f4533a208073b08fd8308b4ea1a3e78..cecfd6ba89b08e4bdd7fd734e7de247e7c4da3b4 100644 (file)
@@ -186,9 +186,9 @@ $stat-font-size: 2.5rem;
 
 $abide-inputs: true;
 $abide-labels: true;
-$input-background-invalid: map-get($foundation-palette, alert);
-$form-label-color-invalid: map-get($foundation-palette, alert);
-$input-error-color: map-get($foundation-palette, alert);
+$input-background-invalid: get-color(alert);
+$form-label-color-invalid: get-color(alert);
+$input-error-color: get-color(alert);
 $input-error-font-size: rem-calc(12);
 $input-error-font-weight: $global-weight-bold;
 
@@ -396,7 +396,7 @@ $menu-margin: 0;
 $menu-margin-nested: 1rem;
 $menu-item-padding: 0.7rem 1rem;
 $menu-item-color-active: $white;
-$menu-item-background-active: map-get($foundation-palette, primary);
+$menu-item-background-active: get-color(primary);
 $menu-icon-spacing: 0.25rem;
 
 // 22. Meter