Skip to content

Commit

Permalink
Fix button background color not being used when defined in settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsamuels committed Apr 28, 2014
1 parent 29db908 commit 54526ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion scss/foundation/_settings.scss
Expand Up @@ -355,7 +355,7 @@
// We use these to control button border styles.
// $button-border-width: 0px;
// $button-border-style: solid;
// $bg: $primary-color;
// $button-bg: $primary-color;
// $button-border-color: scale-color($bg, $lightness: $button-function-factor);

// We use this to set the default radius used throughout the core.
Expand Down
14 changes: 7 additions & 7 deletions scss/foundation/components/_buttons.scss
Expand Up @@ -36,8 +36,8 @@ $button-function-factor: -20% !default;
// We use these to control button border styles.
$button-border-width: 0px !default;
$button-border-style: solid !default;
$bg: $primary-color !default;
$button-border-color: scale-color($bg, $lightness: $button-function-factor) !default;
$button-bg: $primary-color !default;
$button-border-color: scale-color($button-bg, $lightness: $button-function-factor) !default;

// We use this to set the default radius used throughout the core.
$button-radius: $global-radius !default;
Expand Down Expand Up @@ -117,10 +117,10 @@ $button-disabled-opacity: 0.7 !default;
//
// We use this mixin to add button color styles
//
// $bg - Primary color set in settings file. Default: $primary-color.
// $bg - Primary color set in settings file. Default: $button-bg.
// $radius - If true, set to button radius which is $global-radius || explicitly set radius amount in px (ex. $radius:10px). Default: true
// $disabled - We can set $disabled:true to create a disabled transparent button. Default: false
@mixin button-style($bg:$primary-color, $radius:false, $disabled:false) {
@mixin button-style($bg:$button-bg, $radius:false, $disabled:false) {

// We control which background styles are used,
// these can be removed by setting $bg:false
Expand Down Expand Up @@ -166,13 +166,13 @@ $button-disabled-opacity: 0.7 !default;
// We use this to quickly create buttons with a single mixin. As @jaredhardy puts it, "the kitchen sink mixin"
//
// $padding - Used to build padding for buttons Default: $button-med ||= rem-calc(12)
// $bg - Primary color set in settings file. Default: $primary-color.
// $bg - Primary color set in settings file. Default: $button-bg.
// $radius - If true, set to button radius which is $global-radius || explicitly set radius amount in px (ex. $radius:10px). Default:false.
// $full-width - We can set $full-width:true to remove side padding extend width. Default:false.
// $disabled - We can set $disabled:true to create a disabled transparent button. Default:false.
// $is-input - <input>'s and <button>'s take on strange padding. We added this to help fix that. Default:false.
// $is-prefix - Not used? Default:false.
@mixin button($padding:$button-med, $bg:$primary-color, $radius:false, $full-width:false, $disabled:false, $is-prefix:false) {
@mixin button($padding:$button-med, $bg:$button-bg, $radius:false, $full-width:false, $disabled:false, $is-prefix:false) {
@include button-base;
@include button-size($padding, $full-width);
@include button-style($bg, $radius, $disabled);
Expand Down Expand Up @@ -205,7 +205,7 @@ $button-disabled-opacity: 0.7 !default;
&.radius { @include button-style($bg:false, $radius:true); }
&.round { @include button-style($bg:false, $radius:$button-round); }

&.disabled, &[disabled] { @include button-style($bg:$primary-color, $disabled:true);
&.disabled, &[disabled] { @include button-style($bg:$button-bg, $disabled:true);
&.secondary { @include button-style($bg:$secondary-color, $disabled:true); }
&.success { @include button-style($bg:$success-color, $disabled:true); }
&.alert { @include button-style($bg:$alert-color, $disabled:true); }
Expand Down

0 comments on commit 54526ad

Please sign in to comment.