Skip to content

Commit

Permalink
fix(toolbar): get the correct contrast color for md mode
Browse files Browse the repository at this point in the history
fixes an issue introduced by the fix in #11848

references #11848
  • Loading branch information
brandyscarney committed Jun 2, 2017
1 parent 1c76cde commit 0f4ed1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/toolbar/toolbar.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ $toolbar-button-md-strong-font-weight: bold !default;
border-color: $color-contrast;
}

@each $color-name, $color-base, $color-contrast in get-colors($colors-md) {
@each $color-name, $color-base, $color-contrast in get-colors($colors-md, md) {
@include md-bar-button-default($color-name, $color-base, $color-contrast);
@include md-bar-button-outline($color-name, $color-base, $color-contrast);
@include md-bar-button-solid($color-name, $color-base, $color-contrast);
Expand Down Expand Up @@ -384,7 +384,7 @@ $toolbar-button-md-strong-font-weight: bold !default;
@include md-bar-button-default(default, $toolbar-md-button-color, color-contrast($colors-md, $toolbar-md-button-color, md));
@include md-bar-button-default(clear, $toolbar-md-button-color, color-contrast($colors-md, $toolbar-md-button-color, md));

@each $color-name, $color-base, $color-contrast in get-colors($colors-md) {
@each $color-name, $color-base, $color-contrast in get-colors($colors-md, md) {
@include md-toolbar-theme($color-name, $color-base, $color-contrast);
@include md-bar-button-default($color-name, $color-base, $color-contrast);
@include md-bar-button-outline($color-name, $color-base, $color-contrast);
Expand Down
5 changes: 3 additions & 2 deletions src/themes/ionic.functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
// @param {Map} $colors - colors map
// @return {List} $color-name, $color-base, $color-contrast
// ----------------------------------------------------------
@function get-colors($colors) {
@function get-colors($colors, $custom-contrast-mode: null) {
$colors-list: ();

@each $color-name, $color-value in $colors {
Expand All @@ -283,11 +283,12 @@
$color-contrast: map-get($color-value, contrast);
} @else {
$color-base: $color-value;
$color-contrast: color-inverse($color-value);
$color-contrast: color-contrast($colors, $color-value, $custom-contrast-mode);
}

$colors-list: append($colors-list, ($color-name, $color-base, $color-contrast), comma);
}

@return $colors-list;
}

0 comments on commit 0f4ed1c

Please sign in to comment.