/* FormHack v1.0.0 (formhack.io) */ // Set Variables ----------------------------- // We're going to inject some of our default variables for the button styles: // Font $fh-font-family: $sans-regular !important; $fh-font-size: 14px; $fh-font-color: $base-text-color; // Borders $fh-border-radius: 0px; $fh-border-width: 2px; $fh-border-style: solid; $fh-border-color: $base-color-9; // Inputs, Textareas, Select, Option $fh-input-height: 36px; $fh-input-width: 100%; $fh-input-max-width: 100%; $fh-input-bg-color: #fff; $fh-focus-bg-color: #eee; $fh-focus-border-color: darken($fh-border-color, 50%); $fh-focus-font-color: darken($fh-font-color, 50%); // Select Vendor Styling $fh-allow-vendor-styling: true; // Fieldset & Legend Styling $fh-fieldset-bare: false; // Buttons & Input Submits $fh-button-height: auto; $fh-button-width: auto; $fh-button-max-width: auto; // adjust these colors $fh-button-font-color: $button-color; $fh-button-bg-color: $button-background-color; $fh-button-hover-bg-color: $button-background-color-hover; $fh-buton-hover-font-color: $button-color-hover; // Layout $fh-centered: false; $fh-display: block; // placeholders // (my addition Thursday, May 7, 2015) $placeholder-color: lighten($base-text-color, 25%); $placeholder-margin: 0!important; $placeholder-padding: 0!important; $placeholder-font-size: $fh-font-size; $placeholder-line-height: 1em !important; $placeholder-line-height-ff: 2em !important; $placeholder-font-weight: normal; $placeholder-font-weight: 400; $placeholder-text-transform: none; ::-webkit-input-placeholder { line-height: $placeholder-line-height; color: $placeholder-color; margin: $placeholder-margin; padding: $placeholder-padding; font-size: $placeholder-font-size; font-weight: $placeholder-font-weight; text-transform: $placeholder-text-transform; } :-moz-placeholder { line-height: $placeholder-line-height; color: $placeholder-color; margin: $placeholder-margin; padding: $placeholder-padding; font-size: $placeholder-font-size; font-weight: $placeholder-font-weight; text-transform: $placeholder-text-transform; } ::-moz-placeholder { line-height: $placeholder-line-height-ff; color: $placeholder-color; margin: $placeholder-margin; padding: $placeholder-padding; font-size: $placeholder-font-size; font-weight: $placeholder-font-weight; text-transform: $placeholder-text-transform; } //firefox 19+ :-ms-input-placeholder { line-height: $placeholder-line-height; color: $placeholder-color; margin: $placeholder-margin; padding: $placeholder-padding; font-size: $placeholder-font-size; font-weight: $placeholder-font-weight; text-transform: $placeholder-text-transform; } //ie // Center/Left-Aligned Layout @mixin center-layout { @if $fh-centered == true { margin: 10px auto; text-align: center; } @else { margin: 10px 0; } } /* Global Reset Styles ------------------ */ input, textarea, select, option, optgroup, button, legend, fieldset { box-sizing: border-box; outline: none; font-family: $fh-font-family; font-size: $fh-font-size; color: $fh-font-color; vertical-align: top; display: $fh-display; @include center-layout; } datalist { font-family: $fh-font-family; font-size: $fh-font-size; } label { display: $fh-display; @include center-layout; $fh-font-family: $sans; } /* Input & Textarea ------------------ */ /* Fields with stnadard width */ input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="color"], input[type="date"], input[type="datetime-local"], input[type="month"], input[type="number"], input[type="tel"], input[type="time"], input[type="url"], input[type="week"], input[list], input[type="file"], select, textarea { width: $fh-input-width; max-width: $fh-input-max-width; padding: $fh-input-height / 5; background-color: $fh-input-bg-color; -webkit-border-radius: $fh-border-radius; -moz-border-radius: $fh-border-radius; -ms-border-radius: $fh-border-radius; -o-border-radius: $fh-border-radius; border-radius: $fh-border-radius; border: $fh-border-width $fh-border-style $fh-border-color; } /* Fields with stnadard height */ input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="color"], input[type="date"], input[type="datetime-local"], input[type="month"], input[type="number"], input[type="tel"], input[type="time"], input[type="url"], input[type="week"], input[list] { height: $fh-input-height; -webkit-appearance: none; } /* Other */ textarea { -webkit-appearance: none; overflow: auto; } input[type="range"] { height: $fh-input-height; width: $fh-input-width; max-width: $fh-input-max-width; } input[type="file"] { min-height: $fh-input-height; } input[type="search"] { height: $fh-input-height; -webkit-appearance: none; } input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } input[type="checkbox"], input[type="radio"] { display: inline-block; vertical-align: middle; } // For checkbox and radio to be centered, need to wrap the input and label in a span - // .checkbox-container { // display: block; // text-align: center; // } .form--radio-group input, .form--radio-group label { display: inline-block !important; vertical-align: middle !important; } .form--radio-group input { margin-right: .5rem; } .form--cb-group input, .form--cb-group label { display: inline-block !important; vertical-align: middle !important; } .form--cb-group input { margin-right: .5rem; } /* Select ------------------ */ select { height: $fh-input-height; @if $fh-allow-vendor-styling == false { -webkit-appearance: none; -moz-appearance: none; -ms-appearance: none; -o-appearance: none; } } select[multiple] { height: auto; min-height: $fh-input-height; padding: 0; option { margin: 0; padding: $fh-input-height / 5; } } /* Fieldset ------------------ */ fieldset { @if $fh-fieldset-bare == true { padding: 0; border: 0; } @else { padding: 10px 25px; -webkit-border-radius: $fh-border-radius; -moz-border-radius: $fh-border-radius; -ms-border-radius: $fh-border-radius; -o-border-radius: $fh-border-radius; border-radius: $fh-border-radius; border: $fh-border-width $fh-border-style $fh-border-color; } } legend { @if $fh-fieldset-bare == true { padding: 0; font-weight: inherit; } @else { padding: 0 5px; font-weight: 700; } } /* Buttons, Input Type Submit/Reset ------------------ */ button, input[type="button"], input[type="submit"], input[type="reset"], input[type="image"] { height: $fh-button-height; width: $fh-button-width; max-width: $fh-button-max-width; background-color: $fh-button-bg-color; padding: $button-padding; cursor: pointer; color: $fh-button-font-color; font-weight: $button-font-weight; -webkit-appearance: none; -moz-appearance: none; -webkit-border-radius: $fh-border-radius; -moz-border-radius: $fh-border-radius; -ms-border-radius: $fh-border-radius; -o-border-radius: $fh-border-radius; border-radius: $fh-border-radius; border: $fh-border-width $fh-border-style $fh-border-color; } input[type="image"] { text-align: center; padding: $fh-input-height / 5; } /* States ------------------ */ input[disabled], textarea[disabled], select[disabled], option[disabled], button[disabled] { cursor: not-allowed; } input:focus, textarea:focus, select:focus, option:focus, button:focus { background-color: $fh-focus-bg-color; border-color: $fh-focus-border-color; } button:hover, input[type="button"]:hover, input[type="submit"]:hover, input[type="reset"]:hover { background-color: $fh-button-hover-bg-color; color: $fh-buton-hover-font-color; }