From 24b3ee0bcab716141dbf846ecd13d4058aa84b82 Mon Sep 17 00:00:00 2001 From: harry Date: Tue, 17 Jan 2017 23:25:42 +0530 Subject: [PATCH] Putting logic at the top of the mixin instead of in between the css properties --- scss/components/_button.scss | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scss/components/_button.scss b/scss/components/_button.scss index 69f5d4a42..032e71c6d 100644 --- a/scss/components/_button.scss +++ b/scss/components/_button.scss @@ -164,17 +164,15 @@ $button-transition: background-color 0.25s ease-out, color 0.25s ease-out !defau $background: $primary-color, $color: $button-color ) { + @if $color == auto { + $color: color-pick-contrast($background, ($button-color, $button-color-alt)); + } + opacity: $button-opacity-disabled; cursor: not-allowed; &, &:hover, &:focus { background-color: $background; - - // If color is set to `auto`, the function `color-pick-contrast` automatically generates a color based on the background color - @if $color == auto { - $color: color-pick-contrast($background, ($button-color, $button-color-alt)); - } - color: $color; } } -- 2.47.2