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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

312 lines
5.6 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;
2020-07-28 23:09:34 +05:30
color: $gl-text-color;
background-color: $input-bg;
2016-04-02 18:10:28 +05:30
}
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
}
2023-03-04 22:38:38 +05:30
/**
* When form input type is number, Firefox & Safari show the up/down arrows
* on the right side of the input persistently, while Chrome shows it only
* on hover or focus, this fix allows us to hide the arrows in all browsers.
* You can conditionally add/remove `hide-spinners` class to have consistent
* behaviour across browsers.
*/
/* stylelint-disable property-no-vendor-prefix */
input[type='number'].hide-spinners {
-moz-appearance: textfield;
appearance: textfield;
&::-webkit-inner-spin-button,
&::-webkit-outer-spin-button {
-webkit-appearance: none;
appearance: none;
margin: 0;
}
}
/* stylelint-enable property-no-vendor-prefix */
2023-04-23 21:23:45 +05:30
/**
* When form input type is search, browsers add a clear input button inside
* the input field. This overlaps with the input field we have already added.
*/
/* stylelint-disable property-no-vendor-prefix */
input[type='search'] {
-webkit-appearance: textfield;
-moz-appearance: textfield;
appearance: textfield;
&::-webkit-search-cancel-button,
&::-webkit-search-results-button {
@include gl-display-none;
}
}
/* stylelint-enable property-no-vendor-prefix */
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
2021-04-17 20:07:23 +05:30
&.form-check-label,
&.custom-control-label {
2019-09-04 21:01:54 +05:30
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 {
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;
}
}
2023-05-27 22:25:52 +05:30
}
2022-07-23 23:45:48 +05:30
2023-05-27 22:25:52 +05:30
.form-control,
[contenteditable=true] {
2022-07-23 23:45:48 +05:30
&:focus {
border-color: $gray-400;
@include gl-focus;
}
}
2016-06-02 11:05:42 +05:30
.select-control {
2023-05-27 22:25:52 +05:30
line-height: 1.3;
2016-06-02 11:05:42 +05:30
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
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 {
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;
2022-04-04 11:22:00 +05:30
.invisible {
visibility: hidden;
}
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) {
2023-05-27 22:25:52 +05:30
height: $input-height;
2018-11-08 19:23:39 +05:30
}
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;
}
}
2023-03-04 22:38:38 +05:30
.show-password-complexity-errors {
.form-control:not(textarea) {
2023-05-27 22:25:52 +05:30
height: $input-height;
2023-03-04 22:38:38 +05:30
}
.password-complexity-error-outline {
border: 1px solid $red-500;
&:focus {
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;
border: 0 none;
}
}
}
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
.input-icon-wrapper > .input-icon-right {
position: absolute;
right: 0.8em;
top: 50%;
transform: translateY(-50%);
2020-10-24 23:57:45 +05:30
color: $gray-400;
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;
}
2023-05-27 22:25:52 +05:30
.add-issuable-form-input-wrapper {
&.focus {
border-color: var(--gray-700, $gray-700);
input {
@include gl-shadow-none;
}
}
.gl-show-field-errors &.form-control:not(textarea) {
height: auto;
}
}
.add-issuable-form-input-wrapper.focus,
.issue-token-remove-button:focus {
@include gl-focus;
}