grafana/public/sass/components/_gf-form.scss

163 lines
3.3 KiB
SCSS
Raw Normal View History

2016-02-20 17:31:35 -06:00
$gf-form-margin: 0.25rem;
2016-02-15 08:27:41 -06:00
.gf-form {
margin-bottom: $gf-form-margin;
display: flex;
flex-direction: row;
align-items: center;
text-align: left;
2016-02-15 08:27:41 -06:00
.cr1 {
margin-left: 8px;
}
}
.gf-form-group {
margin-bottom: $spacer * 2.5;
2016-02-15 08:27:41 -06:00
}
.gf-form-inline {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-content: flex-start;
2016-02-17 06:46:18 -06:00
.gf-form-flex {
flex-grow: 1;
}
2016-02-15 08:27:41 -06:00
}
.gf-form-button-row {
2016-02-24 10:49:08 -06:00
padding-top: $spacer * 1.5;
a, button {
margin-right: $spacer;
}
2016-02-15 08:27:41 -06:00
}
.gf-form-label {
2016-02-16 07:07:41 -06:00
padding: $input-padding-y $input-padding-x;
line-height: $input-line-height;
flex-shrink: 0;
2016-02-16 07:07:41 -06:00
background-color: $input-label-bg;
display: block;
2016-02-16 03:42:06 -06:00
font-size: $font-size-sm;
2016-03-23 09:09:48 -05:00
margin-right: $gf-form-margin;
2016-02-16 07:07:41 -06:00
border: $input-btn-border-width solid transparent;
2016-02-19 13:09:48 -06:00
@include border-radius($label-border-radius-sm);
}
.gf-form-checkbox {
flex-shrink: 0;
padding: $input-padding-y $input-padding-x;
line-height: $input-line-height;
.checkbox-label {
display: inline;
cursor: pointer;
padding: $input-padding-y 0.4rem;
line-height: $input-line-height;
}
2016-02-15 08:27:41 -06:00
}
2016-02-16 07:07:41 -06:00
.gf-form-input {
display: block;
width: 100%;
padding: $input-padding-y $input-padding-x;
2016-03-23 09:09:48 -05:00
margin-right: $gf-form-margin;
2016-02-16 07:07:41 -06:00
font-size: $font-size-base;
line-height: $input-line-height;
color: $input-color;
background-color: $input-bg;
background-image: none;
background-clip: padding-box;
2016-02-20 17:31:35 -06:00
border: $input-btn-border-width solid $input-border-color;
2016-02-19 13:09:48 -06:00
@include border-radius($input-border-radius-sm);
2016-02-16 07:07:41 -06:00
@include box-shadow($input-box-shadow);
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
// Unstyle the caret on `<select>`s in IE10+.
&::-ms-expand {
background-color: transparent;
border: 0;
display: none;
2016-02-16 07:07:41 -06:00
}
// Customize the `:focus` state to imitate native WebKit styles.
@include form-control-focus();
// Placeholder
&::placeholder {
color: $input-color-placeholder;
opacity: 1;
}
&:disabled,
&[readonly] {
background-color: $input-bg-disabled;
// iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
opacity: 1;
}
2016-02-16 07:07:41 -06:00
&:disabled {
cursor: $cursor-disabled;
}
&.gf-size-auto { width: auto; }
}
2016-02-20 10:21:35 -06:00
.gf-form-select-wrapper {
position: relative;
background-color: $input-bg;
2016-03-23 09:09:48 -05:00
margin-right: $gf-form-margin;
2016-02-20 10:21:35 -06:00
select.gf-form-input {
text-indent: .01px;
text-overflow: '';
2016-02-20 10:21:35 -06:00
padding-right: $input-padding-x*2;
-webkit-appearance: none;
-moz-appearance: menulist-text; // was set to "window" and caused odd display on windos and linux.
appearance: none;
&:-moz-focusring {
outline: none;
2016-02-20 10:21:35 -06:00
color: transparent;
text-shadow: 0 0 0 $text-color;
2016-02-20 10:21:35 -06:00
}
}
&:after {
position: absolute;
top: 35%;
right: $input-padding-x/2;
background-color: transparent;
color: $input-color;
font: normal normal normal $font-size-sm/1 FontAwesome;
content: '\f0d7';
pointer-events: none;
}
}
2016-03-23 09:09:48 -05:00
.gf-form--v-stretch {
align-items: stretch;
2016-03-22 17:41:04 -05:00
}
.gf-form-btn {
2016-03-23 09:09:48 -05:00
margin-right: $gf-form-margin;
padding: $input-padding-y $input-padding-x;
line-height: $input-line-height;
flex-shrink: 0;
flex-grow: 0;
}
2016-03-23 09:42:46 -05:00
.natural-language-input {
&input[type="number"] {
font-size: $font-size-base;
line-height: $input-line-height;
margin: -6px -5px 0 5px;
padding: $input-padding-y/2 $input-padding-x/2;
}
}