Browse Source

Add autocomplete styles for forms

pull/2300/head
jlukic 9 years ago
parent
commit
647af37473
2 changed files with 25 additions and 2 deletions
  1. 15
      src/definitions/collections/form.less
  2. 12
      src/themes/default/collections/form.variables

15
src/definitions/collections/form.less

@ -263,7 +263,14 @@
States States
*******************************/ *******************************/
/*--------------------
Autofilled
---------------------*/
.ui.form input:-webkit-autofill {
box-shadow: 0px 0px 0px 100px @inputAutoFillBackground inset;
border-color: @inputAutoFillBorder;
}
/*-------------------- /*--------------------
Placeholder Placeholder
---------------------*/ ---------------------*/
@ -310,6 +317,7 @@
color: @inputErrorPlaceholderFocusColor; color: @inputErrorPlaceholderFocusColor;
} }
/*-------------------- /*--------------------
Focus Focus
---------------------*/ ---------------------*/
@ -340,6 +348,13 @@
-webkit-appearance: none; -webkit-appearance: none;
} }
/* Autofill Focus */
.ui.form input:-webkit-autofill:focus {
box-shadow: 0px 0px 0px 100px @inputAutoFillFocusBackground inset !important;
border-color: @inputAutoFillFocusBorder !important;
}
/*-------------------- /*--------------------
Success Success
---------------------*/ ---------------------*/

12
src/themes/default/collections/form.variables

@ -39,7 +39,6 @@
@inputTransition: @inputTransition:
background-color 0.2s ease, background-color 0.2s ease,
color 0.2s ease, color 0.2s ease,
box-shadow 0.2s ease,
border-color 0.2s ease border-color 0.2s ease
; ;
@inputBoxShadow: 0em 0em 0em 0em transparent inset; @inputBoxShadow: 0em 0em 0em 0em transparent inset;
@ -87,7 +86,7 @@
/* Input Focus */ /* Input Focus */
@inputFocusBackground: @inputBackground; @inputFocusBackground: @inputBackground;
@inputFocusBorderColor: @selectedBorderColor; @inputFocusBorderColor: @selectedBorderColor;
@inputFocusColor: rgba(0, 0, 0, 0.85);
@inputFocusColor: @selectedTextColor;
@inputFocusBoxShadow: @inputFocusPointerSize 0em 0em 0em @selectedBorderColor inset; @inputFocusBoxShadow: @inputFocusPointerSize 0em 0em 0em @selectedBorderColor inset;
@inputFocusBorderRadius: @inputBorderRadius; @inputFocusBorderRadius: @inputBorderRadius;
@ -106,6 +105,15 @@
@formErrorBorder: @negativeBorderColor; @formErrorBorder: @negativeBorderColor;
@formErrorBackground: @negativeBackgroundColor; @formErrorBackground: @negativeBackgroundColor;
/* AutoFill */
@inputAutoFillBackground: #FFFFF0;
@inputAutoFillBorder: #E5DFA1;
/* Focused AutoFill */
@inputAutoFillFocusBackground: @inputAutoFillBackground;
@inputAutoFillFocusBorder: #DDCC27;
/* Input Error */ /* Input Error */
@inputErrorBorderRadius: @inputBorderRadius; @inputErrorBorderRadius: @inputBorderRadius;
@inputErrorBoxShadow: none; @inputErrorBoxShadow: none;

Loading…
Cancel
Save