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

142 lines
2.9 KiB
SCSS
Raw Normal View History

2016-02-19 13:09:48 -06:00
$gf-form-margin: 0.2rem;
$gf-form-label-margin: 0.2rem;
2016-02-15 08:27:41 -06:00
.gf-form {
margin-bottom: $gf-form-margin;
margin-right: $gf-form-margin;
display: flex;
flex-direction: row;
align-items: center;
text-align: left;
2016-02-15 08:27:41 -06:00
.checkbox-label {
display: inline;
cursor: pointer;
2016-02-15 08:27:41 -06:00
padding: 8px 7px 8px 4px;
}
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 {
margin-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-02-19 13:09:48 -06:00
margin-right: $gf-form-label-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;
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;
font-size: $font-size-base;
line-height: $input-line-height;
color: $input-color;
background-color: $input-bg;
background-image: none;
background-clip: padding-box;
border: $input-btn-border-width solid $input-bg;
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;
}
// 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 09:51:54 -06:00
// select.gf-form-input {
// -webkit-appearance: none;
// -moz-appearance: menulist-text; // was set to "window" and caused odd display on windos and linux.
// appearance: none;
//
//
// &:-moz-focusring {
// color: transparent;
// }
// }
//
// .gf-form-select-wrapper {
// position: relative;
// &:after {
// position: absolute;
// top: 50%;
// right: 10px;
// height: 12px;
// margin-top: -6px;
// padding: 0;
// background-color: transparent;
// color: $input-color;
// font: normal normal normal 14px/1 FontAwesome;
// text-align: center;
// content: '\f0d7';
// pointer-events: none;
// }
// }
.gf-form-btn {
padding: $input-padding-y $input-padding-x;
line-height: $input-line-height;
flex-shrink: 0;
flex-grow: 0;
}