From bf2e7bd4da01e0f641c763afc41228444e41c20f Mon Sep 17 00:00:00 2001 From: Arjen Kroeze Date: Fri, 28 Jul 2017 23:46:21 +0200 Subject: [PATCH] Enable removing default colors from the $foundation-palette --- scss/_global.scss | 6 +----- scss/util/_color.scss | 10 ++++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/scss/_global.scss b/scss/_global.scss index d1988eb27..82d188b4b 100644 --- a/scss/_global.scss +++ b/scss/_global.scss @@ -122,11 +122,7 @@ $global-right: if($global-text-direction == rtl, left, right); $global-color-pick-contrast-tolerance: 0 !default; // Internal variables used for colors -$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); +@include add-foundation-colors; @mixin foundation-global-styles { @include -zf-normalize; diff --git a/scss/util/_color.scss b/scss/util/_color.scss index 11a04d9f4..849969ecf 100644 --- a/scss/util/_color.scss +++ b/scss/util/_color.scss @@ -113,17 +113,27 @@ $contrast-warnings: true !default; @mixin add-foundation-colors() { @if map-has-key($foundation-palette, primary) { $primary-color: map-get($foundation-palette, primary) !global; + } @else { + $primary-color: #1779ba !global; } @if map-has-key($foundation-palette, secondary) { $secondary-color: map-get($foundation-palette, secondary) !global; + } @else { + $secondary-color: #767676 !global; } @if map-has-key($foundation-palette, success) { $success-color: map-get($foundation-palette, success) !global; + } @else { + $success-color: #3adb76 !global; } @if map-has-key($foundation-palette, warning) { $warning-color: map-get($foundation-palette, warning) !global; + } @else { + $warning-color: #ffae00 !global; } @if map-has-key($foundation-palette, alert) { $alert-color: map-get($foundation-palette, alert) !global; + } @else { + $alert-color: #cc4b37 !global; } } -- 2.47.2