Skip to content

Commit

Permalink
- updated some sass mapping values to better align with naming conven…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
Sean Elliott committed Mar 23, 2020
1 parent 36c30d4 commit fa48063
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion src/components/notification/_notification.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions src/components/site-wide-message/_site-wide-message.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down
60 changes: 30 additions & 30 deletions src/global/scss/settings/_settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down
12 changes: 6 additions & 6 deletions src/global/scss/tools/_buttons.scss
Original file line number Diff line number Diff line change
@@ -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);
}
}

0 comments on commit fa48063

Please sign in to comment.