From fa480632934d3cf515e361fdbc73a69a1e489203 Mon Sep 17 00:00:00 2001 From: Sean Elliott <> Date: Mon, 23 Mar 2020 13:53:07 +1100 Subject: [PATCH] - updated some sass mapping values to better align with naming conventions --- .../notification/_notification.scss | 2 +- .../site-wide-message/_site-wide-message.scss | 8 +-- src/global/scss/settings/_settings.scss | 60 +++++++++---------- src/global/scss/tools/_buttons.scss | 12 ++-- 4 files changed, 41 insertions(+), 41 deletions(-) diff --git a/src/components/notification/_notification.scss b/src/components/notification/_notification.scss index 0c590fa7..270bb28d 100644 --- a/src/components/notification/_notification.scss +++ b/src/components/notification/_notification.scss @@ -42,7 +42,7 @@ @each $color, $variant in $notification { &--#{$color} { - background-color: map-get($variant, bg); + background-color: map-get($variant, background); border-color: map-get($variant, border); .nsw-notification__icon { diff --git a/src/components/site-wide-message/_site-wide-message.scss b/src/components/site-wide-message/_site-wide-message.scss index c3d8256f..9717a3fe 100644 --- a/src/components/site-wide-message/_site-wide-message.scss +++ b/src/components/site-wide-message/_site-wide-message.scss @@ -5,12 +5,12 @@ @each $color, $variant in $sitewide-message { @if($color == default) { - background-color: map-get($variant, bg); - color: map-get($variant, color); + background-color: map-get($variant, background); + color: map-get($variant, text-color); } @else { &--#{$color} { - background-color: map-get($variant, bg); - color: map-get($variant, color); + background-color: map-get($variant, background); + color: map-get($variant, text-color); } } } diff --git a/src/global/scss/settings/_settings.scss b/src/global/scss/settings/_settings.scss index da9a7e57..578b9097 100644 --- a/src/global/scss/settings/_settings.scss +++ b/src/global/scss/settings/_settings.scss @@ -150,22 +150,22 @@ $grid-col-sizes: ( $notification: ( info: ( border: $info, - bg: $info-background, + background: $info-background, fill: $info, ), success: ( border: $success, - bg: $success-background, + background: $success-background, fill: $success, ), warning: ( border: $warning, - bg: $warning-background, + background: $warning-background, fill: $warning, ), error: ( border: $critical, - bg: $critical-background, + background: $critical-background, fill: $critical, ), ) !default; @@ -186,51 +186,51 @@ $icon-colors: ( $button-variations: ( primary: ( - color: $white, - colorHover: $white, - bg: $nsw-primary-blue, - bgHover: lighten($nsw-primary-blue, 5.88), + text-color: $white, + text-color-hover: $white, + background: $nsw-primary-blue, + background-hover: lighten($nsw-primary-blue, 5.88), border: $nsw-primary-blue, - borderHover: lighten($nsw-primary-blue, 5.88) + border-hover: lighten($nsw-primary-blue, 5.88) ), highlight: ( - color: $white, - colorHover: $white, - bg: $nsw-primary-highlight, - bgHover: lighten($nsw-primary-highlight, 5.88), + text-color: $white, + text-color-hover: $white, + background: $nsw-primary-highlight, + background-hover: lighten($nsw-primary-highlight, 5.88), border: $nsw-primary-highlight, - borderHover: lighten($nsw-primary-highlight, 5.88) + border-hover: lighten($nsw-primary-highlight, 5.88) ), outline: ( - color: $dark80, - colorHover: $white, - bg: $white, - bgHover: $nsw-primary-blue, + text-color: $dark80, + text-color-hover: $white, + background: $white, + background-hover: $nsw-primary-blue, border: $nsw-primary-blue, - borderHover: $nsw-primary-blue + border-hover: $nsw-primary-blue ), white: ( - color: $dark80, - colorHover: $dark80, - bg: $white, - bgHover: $light20, + text-color: $dark80, + text-color-hover: $dark80, + background: $white, + background-hover: $light20, border: $white, - borderHover: $light20 + border-hover: $light20 ), ) !default; $sitewide-message: ( default: ( - color: $white, - bg: $nsw-secondary-blue, + text-color: $white, + background: $nsw-secondary-blue, ), light: ( - color: $dark80, - bg: $info-background, + text-color: $dark80, + background: $info-background, ), critical: ( - color: $white, - bg: $critical, + text-color: $white, + background: $critical, ), ) !default; diff --git a/src/global/scss/tools/_buttons.scss b/src/global/scss/tools/_buttons.scss index b6dbd6bd..745c1a64 100644 --- a/src/global/scss/tools/_buttons.scss +++ b/src/global/scss/tools/_buttons.scss @@ -1,15 +1,15 @@ @mixin button-variant($property-map) { @if type-of($property-map) != 'map' { - @error 'NSW-DS button-variant mixin accepts a map of values consisting of the following keys: color, colorHover, bg, bgHover, border, borderHover.'; + @error 'NSW-DS button-variant mixin accepts a map of values consisting of the following keys: text-color, text-color-hover, background, background-hover, border, border-hover.'; } - color: map-get($property-map, color); - background-color: map-get($property-map, bg); + color: map-get($property-map, text-color); + background-color: map-get($property-map, background); border-color: map-get($property-map, border); &:hover { - color: map-get($property-map, colorHover); - background-color: map-get($property-map, bgHover); - border-color: map-get($property-map, borderHover); + color: map-get($property-map, text-color-hover); + background-color: map-get($property-map, background-hover); + border-color: map-get($property-map, border-hover); } }