mirror of https://github.com/rancher/ui.git
313 lines
6.2 KiB
SCSS
313 lines
6.2 KiB
SCSS
// Forms
|
|
// Placeholder text color
|
|
$label-color : $dark-grey !default;
|
|
$input-color-placeholder : lighten($mid-grey, 5) !default;
|
|
$input-bg : lighten($light-grey, 2) !default;
|
|
$input-bg-hover : $mid-grey !default;
|
|
$input-bg-disabled : lighten($mid-grey, 15%) !default;
|
|
$input-color : $secondary !default;
|
|
$input-border : darken($light-grey, 5) !default;
|
|
$input-group-addon-border-color : $input-border !default;
|
|
$input-border-focus : $info !default;
|
|
$legend-color : $text-color !default;
|
|
$legend-border-color : $light-grey !default;
|
|
$input-group-addon-bg : $light-grey !default;
|
|
$select-bg : $body-bg;
|
|
|
|
select {
|
|
display: block;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
border-width: 2px;
|
|
border-color: $input-border;
|
|
border-radius: 0;
|
|
background: $select-bg;
|
|
border: solid 2px $border;
|
|
padding: 5px 10px;
|
|
font-size: 15px;
|
|
-o-appearance: none;
|
|
-ms-appearance: none;
|
|
-moz-appearance: none;
|
|
-webkit-appearance: none;
|
|
line-height: 24px;
|
|
&:not([multiple]) {
|
|
position: relative;
|
|
background-image: url(images/dropdown-arrow.svg);
|
|
background-repeat: no-repeat;
|
|
background-size: 15px 10px;
|
|
background-position: calc(100% - 10px) center;
|
|
}
|
|
}
|
|
|
|
form {
|
|
display: block;
|
|
position: relative;
|
|
}
|
|
|
|
label {
|
|
color: $label-color;
|
|
display: inline-block;
|
|
}
|
|
|
|
input[type='checkbox'] {
|
|
cursor: pointer;
|
|
height: 1.25em;
|
|
line-height: 1.25em;
|
|
width: 1.25em;
|
|
}
|
|
|
|
input[type='text'],
|
|
input[type='password'],
|
|
input[type='number'],
|
|
input[type='date'],
|
|
input[type='email'],
|
|
input[type='search'],
|
|
input[type='tel'],
|
|
input[type='url'],
|
|
textarea {
|
|
display: block;
|
|
box-sizing: border-box;
|
|
border-width: 1.25px;
|
|
border-color: $input-border;
|
|
border-radius: 0;
|
|
border-style: solid;
|
|
background: $input-bg;
|
|
padding: 5px 10px;
|
|
font-size: 15px;
|
|
line-height: 24px;
|
|
width: 100%;
|
|
|
|
&[size] {
|
|
display: inline-block;
|
|
width: auto;
|
|
}
|
|
|
|
&::placeholder {
|
|
color: $input-color-placeholder;
|
|
}
|
|
|
|
&:hover {
|
|
border-color: $input-bg-hover;
|
|
background: rgba($input-bg-hover, .2);
|
|
&::placeholder {
|
|
color: $input-bg-hover;
|
|
}
|
|
}
|
|
&.disabled, &[disabled], &[disabled]:hover {
|
|
@extend .bg-disabled;
|
|
border-color: $input-bg-disabled;
|
|
cursor: not-allowed;
|
|
&::placeholder {
|
|
color: darken($input-bg-disabled, 5%);
|
|
}
|
|
}
|
|
&:focus {
|
|
background: rgba($input-border-focus, .2);
|
|
border-color: $input-border-focus;
|
|
&::placeholder {
|
|
color: $input-border-focus;
|
|
}
|
|
}
|
|
}
|
|
|
|
.form-control-static {
|
|
line-height: 24px;
|
|
padding: 3px 0;
|
|
border: 2px solid transparent;
|
|
}
|
|
|
|
///inline forms
|
|
.inline-form {
|
|
.col-inline {
|
|
padding: 9px 0;
|
|
}
|
|
.btn {
|
|
border-radius: 0;
|
|
overflow: hidden;
|
|
// padding: 16px;
|
|
position: relative;
|
|
}
|
|
.input-label, .inline-label {
|
|
@extend .btn;
|
|
@extend .gutless;
|
|
display: block;
|
|
line-height: 1.84;
|
|
|
|
label {
|
|
margin-top: 0;
|
|
}
|
|
|
|
&.input-xs {
|
|
padding: 2px 3px;
|
|
line-height: initial;
|
|
font-size: .65em;
|
|
}
|
|
&.input-sm {
|
|
padding: 3px 8px;
|
|
font-size: 0.87em;
|
|
}
|
|
&.input-lg {
|
|
padding: 18px 30px;
|
|
font-size: 1.25em;
|
|
}
|
|
}
|
|
|
|
.inline-label {
|
|
text-align: left;
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* Bootstrap v3.3.7 (http://getbootstrap.com)
|
|
* Copyright 2011-2016 Twitter, Inc.
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
*/
|
|
|
|
.input-group {
|
|
position: relative;
|
|
display: table;
|
|
border-collapse: separate;
|
|
}
|
|
.input-group.search-group {
|
|
position: relative;
|
|
|
|
input {
|
|
padding-right: 34px;
|
|
}
|
|
|
|
.input-group-btn {
|
|
position: absolute;
|
|
right: 34px;
|
|
}
|
|
}
|
|
|
|
|
|
.input-group .form-control:focus {
|
|
z-index: 3;
|
|
}
|
|
|
|
.input-group-addon,
|
|
.input-group-btn,
|
|
.input-group .form-control {
|
|
display: table-cell;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.input-group-addon,
|
|
.input-group-btn {
|
|
width: 1%;
|
|
white-space: nowrap;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.input-group-addon {
|
|
@extend .input-label;
|
|
padding: 6px 12px;
|
|
font-size: 14px;
|
|
font-weight: normal;
|
|
line-height: 1;
|
|
text-align: center;
|
|
}
|
|
|
|
.input-group-addon input[type="radio"],
|
|
.input-group-addon input[type="checkbox"] {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.input-group-addon:first-child {
|
|
border-right: 0;
|
|
}
|
|
|
|
.input-group-addon:last-child {
|
|
border-left: 0;
|
|
}
|
|
|
|
.input-group-btn {
|
|
position: relative;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.input-group-btn > .btn {
|
|
position: relative;
|
|
border-radius: 0;
|
|
}
|
|
|
|
.input-group-btn > .btn:hover,
|
|
.input-group-btn > .btn:focus,
|
|
.input-group-btn > .btn:active {
|
|
z-index: 2;
|
|
}
|
|
|
|
.input-group-btn:first-child > .btn,
|
|
.input-group-btn:first-child > .btn-group {
|
|
margin-right: -1px;
|
|
}
|
|
|
|
.input-group-btn:last-child > .btn,
|
|
.input-group-btn,
|
|
.input-group-btn:last-child > .btn-group {
|
|
// z-index: -1;
|
|
}
|
|
|
|
//input sizes
|
|
.input-xs,
|
|
input.input-xs,
|
|
.input-group.input-xs input,
|
|
.input-group.input-xs .input-group-addon {
|
|
padding: 2px 3px;
|
|
line-height: initial;
|
|
font-size: .65em;
|
|
}
|
|
|
|
.input-sm,
|
|
input.input-sm,
|
|
.input-group.input-sm input,
|
|
.input-group.input-sm .input-group-addon {
|
|
padding: 3px 8px;
|
|
font-size: 0.87em;
|
|
max-height: 32px;
|
|
}
|
|
|
|
.input-lg,
|
|
input.input-lg,
|
|
.input-group.input-lg input,
|
|
.input-group.input-lg .input-group-addon {
|
|
padding: 18px 30px;
|
|
font-size: 1.25em;
|
|
}
|
|
|
|
.box, [class^='bg-'] {
|
|
input[type='text'],
|
|
input[type='password'],
|
|
input[type='number'],
|
|
input[type='date'],
|
|
input[type='email'],
|
|
input[type='search'],
|
|
input[type='tel'],
|
|
input[type='url'],
|
|
textarea {
|
|
border-color: darken($input-bg, 15);
|
|
background: $body-bg;
|
|
}
|
|
}
|
|
|
|
.box .input-group-addon.bg-default {
|
|
background: darken($input-bg, 15);
|
|
}
|
|
|
|
.field-required {
|
|
padding-left: 5px;
|
|
font-weight: bold;
|
|
color: $error;
|
|
}
|
|
|
|
.with-input {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.radio {
|
|
padding: 5px 0;
|
|
}
|