]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Added $input-prefix-border-color to the pre/postfix mixins. This value was not previo... 4298/head
authorTristan Mugford <tristan@dgtl.net>
Fri, 31 Jan 2014 15:49:58 +0000 (15:49 +0000)
committerTristan Mugford <tristan@dgtl.net>
Fri, 31 Jan 2014 15:49:58 +0000 (15:49 +0000)
scss/foundation/components/_forms.scss

index d50eb53988a5f30bc6e4088e6f9685d1f3368396..278a623755930af9dc02944998e20ba7eb7471f6 100644 (file)
@@ -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); }