// // Forms // -------------------------------------------------- // // Resets to bootstrap // label { font-weight: 600; } .form-control { .transition(none); .box-shadow(none); &:focus { .box-shadow(none); } &.align-right { text-align: right; } } // // Nice forms // .form-elements, .form-tabless-fields { .clearfix(); } label { font-size: 12px; } .radio.nolabel label, .checkbox.nolabel label { .text-hide(); } .form-control { border: 1px solid @color-form-field-border; position: relative; -webkit-appearance: none; font-size: 13px; &:focus { border: 1px solid @color-form-field-border-focus; } &.icon { background-repeat: no-repeat; background-position: right -2px; padding-right: 30px !important; background-image: url('../images/bitmap-icons.png'); &.plus { background-position: right -124px; } &.search { background-position: right -84px; } &.user { background-position: right -41px; } &.lock { background-position: right 0; } } &.growable { width: 110px; //.transition(width 0.2s); &:focus, &:active { width: 200px !important; } } } .form-group { position: relative; &, &.layout-item { padding-bottom: 20px; margin-bottom: 0; } .box-sizing(border-box); &.is-required { > label:after { color: @color-form-required-asterisk; vertical-align: super; font-size: 50%; content: " *"; } } &.span-full { width: 100%; float: left; } &.span-left { float: left; width: 48.5%; clear: left; } &.span-right { float: right; width: 48.5%; clear: right; } &.layout-relative { padding-bottom: 0; } &.checkbox-align { padding-left: 23px; margin-top: -21px; } &.no-padding { &.span-left, &.span-right { width: 50%; } } } .form-group-preview { .form-control { background-color: @color-form-field-preview; height: auto; } } .help-block { font-size: 12px; &.before-field { margin-top: 0; } } .field-textarea { resize: vertical; &.size-tiny { min-height: @size-tiny; } &.size-small { min-height: @size-small; } &.size-large { min-height: @size-large; } &.size-huge { min-height: @size-huge; } &.size-giant { min-height: @size-giant; } } .form-buttons { .clearfix(); padding-bottom: 20px; font-size: 0; .btn { margin-right: 10px; } .pull-right { margin-right: 0; margin-left: 10px; } } @media (max-width: @menu-breakpoint-max) { .form-group { &.span-left, &.span-right { width: 100%; clear: none; } } } // // Nice Checkboxes & Radios // .custom-checkbox, .custom-radio { padding-left: 23px; input[type=radio], input[type=checkbox] { display: none; } label { display: inline-block; cursor: pointer; position: relative; padding-left: 20px; margin-right: 15px; margin-left: -20px; font-size: 12px; &:before { content: ""; display: inline-block; text-align: center; width: 16px; height: 16px; margin-right: 10px; position: absolute; left: -3px; bottom: 1px; background-color: #FFFFFF; border: 1px solid @color-custom-input-border; color: @color-custom-input-icon; } &:hover:before { border-color: darken(@color-custom-input-border, 10%); color: darken(@color-custom-input-icon, 10%); } &:active:before { border-color: darken(@color-custom-input-border, 20%); color: darken(@color-custom-input-icon, 20%); } } input[type=radio]:checked + label:before { .icon(@circle); font-size: 9px; line-height: 12px; border-width: 2px; } input[type=checkbox]:checked + label:before { .icon(@check); font-size: 10px; line-height: 12px; border-width: 2px; } &:focus { outline: none; label:before { border-color: @color-focus; } } } .custom-radio label:before { border-radius: 8px; } .custom-checkbox label:before { border-radius: @border-radius-base; } // // ON / OFF Switcher // .switch-field { .field-switch { padding-left: 105px; float: left; } } .custom-switch { display: block; width: 90px; height: 25px; position: relative; text-transform: uppercase; border: 1px solid @color-custom-input-border; .border-radius(3px); * { .box-sizing(border-box); } &.disabled { .opacity(.5); } .slide-button { z-index: 4; display: block; position: absolute; right: 50%; top: 0; width: 50%; height: 100%; background-color: @color-switch-input-bg; .border-radius(3px); .transition(all 0.1s); } label, > span { line-height: 23px; vertical-align: middle; } label { z-index: 3; width: 100%; display: block; position: relative; } input { z-index: 5; position: absolute; .opacity(0); &:checked { ~ .slide-button { right: 0%; } ~ span { background-color: @color-switch-input-on; } ~ span span { &:first-of-type { color: #FFFFFF; } &:last-of-type { color: #666666; } } } } > span { display: block; height: 100%; position: absolute; left: 0; width: 100%; background-color: @color-switch-input-off; .user-select(none); .border-radius(3px); span { z-index: 5; display: block; width: 50%; position: absolute; top: 0; left: 0; text-align: center; &:last-child { left: 50%; color: #FFFFFF; } &:first-of-type { color: #666666; } } } } // // Nice Dropdowns // .custom-select { // // Allows Select2 to work with Bootstrap // .select2-choice { border: 0; border-radius: @border-radius-base; .select2-arrow { border-radius: 0 @border-radius-base @border-radius-base 0; } } &.select2-container { padding: 0px; .select2-choices { border: 0 !important; border-radius: @border-radius-base; } } &.select2-container.select2-dropdown-open { border-color: @color-form-field-border-focus; &,.select2-choices { border-radius: @border-radius-base @border-radius-base 0 0; } &.select2-drop-above { border-radius: 0 0 @border-radius-base @border-radius-base; } } // // Restyle Select2 // &.select2-container { .select2-choice { height: 36px; line-height: 36px; padding: 0 0 0 15px; border: none; background: #FFFFFF; .select2-arrow { width: 38px; background: none; background: transparent; border-left: none; b { background: none; text-align: center; color: @color-custom-input-icon; &:before { .icon(@angle-down); } } } } &.select2-container-disabled { background-color: #f4f4f4; .select2-choice { background-color: #f4f4f4; .select2-arrow b { .opacity(.5); } } } } &.select2-container.select2-container-active { .select2-choice, .select2-choices { .box-shadow(none); } } &.select2-container.select2-dropdown-open, &.select2-container.select2-dropdown-open.select2-drop-above { .select2-choice { background: @color-custom-select-bg; .select2-arrow { border-left-color: transparent; b { &:before { .icon(@angle-up); } } } } } } // // Outside Select2 container // .select2-drop { .box-shadow(none); border: 1px solid @color-custom-select-border; border-top: none; &.select2-drop-above { .box-shadow(none); border: 1px solid @color-custom-select-border; border-bottom: none; } &.select2-drop-active { .border-bottom-radius(@border-radius-base); } &.select2-drop-above.select2-drop-active { border-top: 1px solid @color-custom-select-border; .border-bottom-radius(0); } .select2-search { padding: 0; min-height: 36px; input { min-height: 36px; border: none; border-bottom: 1px solid @color-custom-select-border; background: transparent url('../images/bitmap-icons.png') no-repeat 100% -84px; } } .select2-results { padding: 0; margin: 0; .select2-no-results, .select2-searching, .select2-selection-limit { background: #FFFFFF; } .select2-highlighted { background: @color-custom-select-bg-hover; } > li > div { padding: 5px 7px 5px; } } }