// Forms .form-group:not(:last-child) { margin-bottom: 1rem; } @media screen and (min-width: 841px) { .form-horizontal { padding: 1rem; .form-group { display: flex; } .form-label { padding: .8rem .4rem; } .form-checkbox, .form-radio { margin: .5rem 0; } } } @media screen and (max-width: 840px) { .form-horizontal { .col-12, .col-11, .col-10, .col-9, .col-8, .col-7, .col-6, .col-5, .col-4, .col-3, .col-2, .col-1 { width: 100%; } } } // Form element: Input boxes .form-input { position: relative; display: block; width: 100%; max-width: 100%; height: 3.2rem; background-color: #fff; background-image: none; border: .1rem solid @control-color; border-radius: .3rem; color: @body-font-color; font-size: 1.4rem; line-height: 1.6rem; padding: .5rem .8rem; -webkit-appearance: none; outline: 0; &:focus { border-color: @core-color; } &[disabled] { background-color: #eeeff2; } // Input sizes &.input-sm { height: 2.4rem; border-radius: .2rem; font-size: 1.2rem; padding: .4rem .6rem; } &.input-lg { height: 4.2rem; border-radius: .4rem; font-size: 1.6rem; padding: 1rem 1.2rem; } &.input-inline { width: auto; display: inline-block; } // Textarea textarea& { height: auto; line-height: 2rem; } // Form status .has-success &, &.is-success { border-color: @control-color-success; } .has-danger &, &.is-danger { border-color: @control-color-danger; } } // Form element: Label .form-label { display: block; margin-bottom: .5rem; line-height: 1.6rem; } // Form element: Select .form-select { appearance: none; &:not([multiple]) { height: 3.2rem; font-size: 1.4rem; vertical-align: middle; padding: .5rem 2.4rem .5rem .8rem; border: .1rem solid @control-color; border-radius: .3rem; outline: 0; background: #fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAUCAMAAACzvE1FAAAADFBMVEUzMzMzMzMzMzMzMzMKAG/3AAAAA3RSTlMAf4C/aSLHAAAAPElEQVR42q3NMQ4AIAgEQTn//2cLdRKppSGzBYwzVXvznNWs8C58CiussPJj8h6NwgorrKRdTvuV9v16Afn0AYFOB7aYAAAAAElFTkSuQmCC) no-repeat right 0.75rem center / 0.8rem 1rem; } &:focus { border-color: @core-color; } select::-ms-expand { display: none; } // Select size &.select-sm { height: 2.4rem; border-radius: .2rem; font-size: 1.2rem; padding: .4rem .6rem; } } // Form element: Checkbox and radio .form-checkbox, .form-radio, .form-switch { input { display: none; } } .form-checkbox, .form-radio { line-height: 1.8rem; padding: .3rem 2rem; cursor: pointer; display: inline-block; position: relative; .form-icon { font-size: 1.4rem; line-height: 2.4rem; vertical-align: top; border: .1rem solid @control-color; display: inline-block; width: 1.4rem; height: 1.4rem; padding: 0; position: absolute; top: .5rem; left: 0; outline: none; } &:hover .form-icon { border-color: darken(@control-color, 15%); } input:checked + .form-icon { background-color: @core-color; border-color: @core-color; } } .form-checkbox { .form-icon { border-radius: .2rem; } input:checked + .form-icon { &::after { width: .6rem; height: 1rem; content: ""; position: absolute; top: 50%; left: 50%; margin-top: -.6rem; margin-left: -.3rem; border: .2rem solid #fff; border-top-width: 0; border-left-width: 0; transform: rotate(45deg); } } } .form-radio { .form-icon { border-radius: .7rem; } input:checked + .form-icon { &::after { width: .4rem; height: .4rem; content: ""; position: absolute; top: 50%; left: 50%; margin-top: -.2rem; margin-left: -.2rem; border-radius: .2rem; background-color: #fff; } } } // Form element: Switch .form-switch { line-height: 1.8rem; padding: .3rem 2rem .3rem 3.6rem; cursor: pointer; display: inline-block; position: relative; .form-icon { line-height: 2.4rem; vertical-align: top; border: .1rem solid @control-color; background-color: @control-color; display: inline-block; width: 3rem; height: 1.8rem; padding: 0; border-radius: .9rem; position: absolute; top: .3rem; left: 0; outline: none; &::after { content: ""; display: block; width: 1.6rem; height: 1.6rem; border-radius: .8rem; position: absolute; top: 0; left: 0; background-color: #fff; transition: left .15s ease; } } input:checked + .form-icon { background-color: @core-color; border-color: @core-color; &::after { left: 1.2rem; } } } // Form element: Input groups .input-group { display: flex; .input-group-addon { line-height: 1.6rem; padding: .7rem .8rem; border: .1rem solid @control-color; border-radius: .3rem; background-color: @core-border-color; } .input-group-addon, .input-group-btn { flex: 1 0 auto; } .form-input, .input-group-addon, .input-group-btn { &:first-child:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; } &:not(:first-child):not(:last-child) { margin-left: -.1rem; border-radius: 0; } &:last-child:not(:first-child) { margin-left: -.1rem; border-top-left-radius: 0; border-bottom-left-radius: 0; } &:focus { z-index: 99; } } }