debian-mirror-gitlab/app/assets/stylesheets/framework/forms.scss

248 lines
4 KiB
SCSS
Raw Normal View History

2015-04-26 12:48:37 +05:30
textarea {
resize: vertical;
}
2016-04-02 18:10:28 +05:30
input {
border-radius: $border-radius-base;
}
2014-09-02 18:07:02 +05:30
input[type='text'].danger {
2017-08-17 22:00:37 +05:30
background: $input-danger-bg !important;
2018-11-20 20:47:30 +05:30
border-color: $red-400;
2020-04-22 19:07:51 +05:30
text-shadow: 0 1px 1px $white;
2014-09-02 18:07:02 +05:30
}
.datetime-controls {
select {
width: 100px;
}
}
.form-actions {
2015-12-23 02:04:40 +05:30
margin-top: 0;
margin-bottom: -$gl-padding;
padding: $gl-padding;
2017-08-17 22:00:37 +05:30
background-color: $gray-light;
2015-04-26 12:48:37 +05:30
border-top: 1px solid $border-color;
}
2014-09-02 18:07:02 +05:30
label {
2019-09-04 21:01:54 +05:30
font-weight: $gl-font-weight-bold;
2014-09-02 18:07:02 +05:30
&.inline-label {
margin: 0;
}
2016-06-02 11:05:42 +05:30
2019-09-04 21:01:54 +05:30
&.form-check-label {
font-weight: $gl-font-weight-normal;
}
2018-11-18 11:00:15 +05:30
&.label-bold {
2018-03-17 18:26:18 +05:30
font-weight: $gl-font-weight-bold;
2016-06-02 11:05:42 +05:30
}
2014-09-02 18:07:02 +05:30
}
2019-02-15 15:39:39 +05:30
.label-wrapper {
display: block;
margin: 0;
}
2014-09-02 18:07:02 +05:30
.inline-input-group {
width: 250px;
}
.custom-form-control {
width: 150px;
}
2018-11-08 19:23:39 +05:30
@include media-breakpoint-up(sm) {
2014-09-02 18:07:02 +05:30
.custom-form-control {
width: 150px;
}
}
/* Medium devices (desktops, 992px and up) */
2018-11-08 19:23:39 +05:30
@include media-breakpoint-up(md) {
2014-09-02 18:07:02 +05:30
.custom-form-control {
width: 170px;
}
}
/* Large devices (large desktops, 1200px and up) */
2018-11-08 19:23:39 +05:30
@include media-breakpoint-up(lg) {
2014-09-02 18:07:02 +05:30
.custom-form-control {
width: 200px;
}
}
2017-08-17 22:00:37 +05:30
.help-form .form-group {
margin-left: 0;
margin-right: 0;
.form-control {
height: 29px;
2020-04-22 19:07:51 +05:30
background: $white;
2018-11-18 11:00:15 +05:30
font-family: $monospace-font;
2017-08-17 22:00:37 +05:30
}
2018-11-08 19:23:39 +05:30
@include media-breakpoint-down(xs) {
2017-08-17 22:00:37 +05:30
padding: 0 $gl-padding;
}
}
2014-09-02 18:07:02 +05:30
.fieldset-form fieldset {
margin-bottom: 20px;
}
.form-control {
@include box-shadow(none);
2019-07-07 11:18:12 +05:30
border-radius: $border-radius-default;
padding: $gl-vert-padding $gl-input-padding;
2018-11-08 19:23:39 +05:30
&.input-short {
width: $input-short-width;
@include media-breakpoint-up(md) {
width: $input-short-md-width;
}
}
}
2016-06-02 11:05:42 +05:30
.select-control {
padding-left: 10px;
padding-right: 10px;
2017-09-10 17:25:29 +05:30
appearance: none;
2019-07-31 22:56:46 +05:30
/* stylelint-disable property-no-vendor-prefix */
-webkit-appearance: none;
-moz-appearance: none;
/* stylelint-enable property-no-vendor-prefix */
2017-09-10 17:25:29 +05:30
&::-ms-expand {
display: none;
}
2016-06-02 11:05:42 +05:30
}
.form-control-inline {
display: inline;
2014-09-02 18:07:02 +05:30
}
2015-04-26 12:48:37 +05:30
.wiki-content {
margin-top: 35px;
}
2015-10-24 18:46:33 +05:30
2019-07-07 11:18:12 +05:30
.form-control::placeholder {
2018-11-20 20:47:30 +05:30
color: $gl-text-color-tertiary;
2015-10-24 18:46:33 +05:30
}
.input-group {
2015-12-23 02:04:40 +05:30
.select2-container {
display: table-cell;
2018-03-27 19:54:05 +05:30
max-width: 180px;
2015-12-23 02:04:40 +05:30
}
2016-11-03 12:29:30 +05:30
2018-11-08 19:23:39 +05:30
.input-group-prepend,
.input-group-append {
2017-08-17 22:00:37 +05:30
background-color: $input-group-addon-bg;
2015-10-24 18:46:33 +05:30
}
2016-11-03 12:29:30 +05:30
2018-11-08 19:23:39 +05:30
.input-group-prepend:not(:first-child):not(:last-child),
.input-group-append:not(:first-child):not(:last-child) {
2015-12-23 02:04:40 +05:30
border-left: 0;
border-right: 0;
}
}
2018-11-08 19:23:39 +05:30
.form-text.text-muted {
2015-12-23 02:04:40 +05:30
margin-bottom: 0;
2018-03-17 18:26:18 +05:30
margin-top: #{$grid-size / 2};
2019-07-31 22:56:46 +05:30
font-size: $gl-font-size;
2015-10-24 18:46:33 +05:30
}
2016-11-03 12:29:30 +05:30
2019-07-07 11:18:12 +05:30
.gl-field-error,
.invalid-feedback {
2017-08-17 22:00:37 +05:30
color: $red-500;
2019-07-07 11:18:12 +05:30
font-size: $gl-font-size;
2016-11-03 12:29:30 +05:30
}
2017-08-17 22:00:37 +05:30
.gl-show-field-errors {
2018-11-20 20:47:30 +05:30
.form-control:not(textarea) {
2018-11-08 19:23:39 +05:30
height: 34px;
}
2017-08-17 22:00:37 +05:30
.gl-field-success-outline {
border: 1px solid $green-600;
&:focus {
2019-09-04 21:01:54 +05:30
box-shadow: 0 0 0 1px $green-600 inset, 0 1px 1px $gl-field-focus-shadow inset,
0 0 4px 0 $green-600;
2017-08-17 22:00:37 +05:30
border: 0 none;
}
}
.gl-field-error-outline {
border: 1px solid $red-500;
&:focus {
2019-09-04 21:01:54 +05:30
box-shadow: 0 0 0 1px $red-500 inset, 0 1px 1px $gl-field-focus-shadow inset,
0 0 4px 0 $gl-field-focus-shadow-error;
2017-08-17 22:00:37 +05:30
border: 0 none;
}
}
.gl-field-success-message {
color: $green-600;
}
.gl-field-error-message {
color: $red-500;
}
.gl-field-hint {
color: $gl-text-color;
}
}
2018-11-08 19:23:39 +05:30
@include media-breakpoint-down(xs) {
2017-08-17 22:00:37 +05:30
.remember-me {
.remember-me-checkbox {
margin-top: 0;
}
}
}
2018-11-08 19:23:39 +05:30
2019-09-04 21:01:54 +05:30
.input-icon-wrapper,
.select-wrapper {
2018-11-08 19:23:39 +05:30
position: relative;
2019-09-04 21:01:54 +05:30
}
2018-11-08 19:23:39 +05:30
2019-09-04 21:01:54 +05:30
.select-wrapper > .fa-chevron-down {
position: absolute;
font-size: 10px;
right: 10px;
top: 12px;
color: $gray-darkest;
pointer-events: none;
}
.input-icon-wrapper > .input-icon-right {
position: absolute;
right: 0.8em;
top: 50%;
transform: translateY(-50%);
color: $gray-600;
2018-11-08 19:23:39 +05:30
}
2019-02-15 15:39:39 +05:30
.input-md {
max-width: $input-md-width;
width: 100%;
}
2018-11-08 19:23:39 +05:30
.input-lg {
2019-02-15 15:39:39 +05:30
max-width: $input-lg-width;
2018-11-08 19:23:39 +05:30
width: 100%;
}
2019-07-07 11:18:12 +05:30
.input-group-text {
max-height: $input-height;
}