From: Tristan Mugford Date: Fri, 31 Jan 2014 15:49:58 +0000 (+0000) Subject: Added $input-prefix-border-color to the pre/postfix mixins. This value was not previo... X-Git-Tag: v5.1.0~13^2~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4298%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Added $input-prefix-border-color to the pre/postfix mixins. This value was not previously used anywhere, despite being defined in _forms.scss and _settings.scss. --- diff --git a/scss/foundation/components/_forms.scss b/scss/foundation/components/_forms.scss index d50eb5398..278a62375 100644 --- a/scss/foundation/components/_forms.scss +++ b/scss/foundation/components/_forms.scss @@ -183,12 +183,11 @@ $select-bg-color: #fafafa !default; // $bg - Default:$input-prefix-bg || scale-color(#fff, $lightness: -5%) !default; // $is-button - Toggle position settings if prefix is a button. Default:false // -@mixin prefix($bg:$input-prefix-bg,$is-button:false) { +@mixin prefix($bg:$input-prefix-bg, $border:$input-prefix-border-color, $is-button:false) { @if $bg { $bg-lightness: lightness($bg); background: $bg; - border-color: scale-color($bg, $lightness: -11%); border-#{$opposite-direction}: none; // Control the font color based on background brightness @@ -196,6 +195,10 @@ $select-bg-color: #fafafa !default; @else { color: $input-prefix-font-color-alt; } } + @if $border { + border-color: $border; + } + @if $is-button { padding-#{$default-float}: 0; padding-#{$opposite-direction}: 0; @@ -213,12 +216,11 @@ $select-bg-color: #fafafa !default; // We use this mixin to create postfix label styles // $bg - Default:$input-prefix-bg || scale-color(#fff, $lightness: -5%) !default; // $is-button - Toggle position settings if prefix is a button. Default: false -@mixin postfix($bg:$input-prefix-bg, $is-button:false) { +@mixin postfix($bg:$input-prefix-bg, $border:$input-prefix-border-color, $is-button:false) { @if $bg { $bg-lightness: lightness($bg); background: $bg; - border-color: scale-color($bg, $lightness: -16%); border-#{$default-float}: none; // Control the font color based on background brightness @@ -226,6 +228,10 @@ $select-bg-color: #fafafa !default; @else { color: $input-prefix-font-color-alt; } } + @if $border { + border-color: $border; + } + @if $is-button { padding-#{$default-float}: 0; padding-#{$opposite-direction}: 0; @@ -349,8 +355,8 @@ $select-bg-color: #fafafa !default; .postfix { @include prefix-postfix-base; } /* Adjust padding, alignment and radius if pre/post element is a button */ - .postfix.button { @include button-size(false,false,false); @include postfix(false,true); } - .prefix.button { @include button-size(false,false,false); @include prefix(false,true); } + .postfix.button { @include button-size(false,false,false); @include postfix(false, false, true); } + .prefix.button { @include button-size(false,false,false); @include prefix(false, false, true); } .prefix.button.radius { @include radius(0); @include side-radius(left, $button-radius); } .postfix.button.radius { @include radius(0); @include side-radius(right, $button-radius); }