/* FormHack v1.1.0 (formhack.io) */ // Config ----------------------------- // Font $fh-font-family: 'Raleway', sans-serif !default; $fh-font-size: 14px !default; $fh-font-color: $font-color !default; // Borders $fh-border-radius: 3px !default; $fh-border-width: 1px !default; $fh-border-style: solid !default; $fh-border-color: #666 !default; // Inputs, Textareas, Select, Option $fh-input-height: 32px !default; $fh-input-width: 100% !default; $fh-input-max-width: 100% !default; $fh-input-bg-color: #fff !default; $fh-focus-bg-color: rgb(255, 255, 255) !default; $fh-focus-border-color: #4496d3 !default; $fh-focus-font-color: $fh-font-color !default; // Select Vendor Styling $fh-allow-vendor-styling: true !default; // Fieldset & Legend Styling $fh-fieldset-bare: false !default; // Buttons & Input Submits $fh-button-height: 32px; $fh-button-width: 100%; $fh-button-max-width: 100%; $fh-button-font-color: $fh-font-color; $fh-button-bg-color: transparent; $fh-button-hover-bg-color: transparent; $fh-button-hover-font-color: $fh-font-color; // Layout $fh-centered: false !default; $fh-display: block !default; // Center/Left-Aligned Layout @mixin center-layout { @if $fh-centered == true { margin: 0 auto; text-align: center; } @else { margin: 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; } /* Input & Textarea ------------------ */ /* Fields with standard 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; border-radius: $fh-border-radius; border: $fh-border-width $fh-border-style $fh-border-color; } /* Fields with standard 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"] { width:auto; display: inline-block; vertical-align: middle; font-size:20px; } // For checkbox and radio to be centered, need to wrap the input and label in a span - // .checkbox-container { // display: block; // text-align: center; // } /* Select ------------------ */ select { padding: 3px 15px; height: $fh-input-height; width:auto; @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; 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"] { -webkit-appearance: none; -moz-appearance: none; } 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 { background-color: $fh-focus-bg-color; border-color: $fh-focus-border-color; } input[type="checkbox"]:focus, input[type="radio"]:focus { outline: $fh-focus-border-color solid 2px; } input { &.w120 { width:120px; } &.w160 { width:160px; } &.w200 { width:200px; } &.w240 { width:240px; } &.w280 { width:280px; } &.w320 { width:320px; } &.w360 { width:360px; } &.w400 { width:400px; } &.w440 { width:440px; } }