From 2c96b3b379035cf7d96efb7f908f20d7b630e520 Mon Sep 17 00:00:00 2001 From: Geoff Kimball Date: Wed, 17 Feb 2016 16:54:05 -0800 Subject: [PATCH] Document usage of add-foundation-colors() mixin --- docs/pages/global.md | 4 ++++ scss/util/_color.scss | 1 + 2 files changed, 5 insertions(+) diff --git a/docs/pages/global.md b/docs/pages/global.md index 698c4c40c..6faa03e9f 100644 --- a/docs/pages/global.md +++ b/docs/pages/global.md @@ -96,6 +96,10 @@ $foundation-palette: ( Using the above palette, we can add the `.mars`, `.saturn`, or `.neptune` classes to buttons, labels, badges, and more. +
+

If you're upgrading an older version of Foundation 6 to 6.2, add the line @include add-foundation-colors; below the Global section of your settings file. This will allow legacy color variables, such as $primary-color and $secondary-color, to continue working. +

+ --- To color a component, add the name of the color as a class. diff --git a/scss/util/_color.scss b/scss/util/_color.scss index 1266d976b..a001de2a2 100644 --- a/scss/util/_color.scss +++ b/scss/util/_color.scss @@ -40,6 +40,7 @@ @return scale-color($color, $lightness: $scale); } +/// Transfers the colors in the `$foundation-palette` variable into the legacy color variables, such as `$primary-color` and `$secondary-color`. Call this mixin below the Global section of your settings file to properly migrate your codebase. @mixin add-foundation-colors() { @if map-has-key($foundation-palette, primary) { $primary-color: map-get($foundation-palette, primary) !global; -- 2.47.2