gitlab-org--gitlab-foss/app/assets/stylesheets/framework/selects.scss

257 lines
4.7 KiB
SCSS
Raw Normal View History

/** Select2 selectbox style override **/
2016-02-22 09:58:04 -05:00
.select2-container {
width: 100% !important;
}
.select2-container,
.select2-container.select2-drop-above {
.select2-choice {
2016-11-30 08:25:25 -05:00
background: $white-light;
2016-02-19 21:46:18 -05:00
border-color: $input-border;
height: 35px;
2016-06-06 14:11:49 -04:00
padding: $gl-vert-padding $gl-input-padding;
font-size: $gl-font-size;
2015-03-09 21:45:36 -04:00
line-height: 1.42857143;
border-radius: $border-radius-base;
.select2-arrow {
2016-02-19 21:46:18 -05:00
background-image: none;
background-color: transparent;
border: none;
2016-02-22 12:16:42 -05:00
padding-top: 6px;
padding-right: 10px;
2016-02-19 21:46:18 -05:00
b {
display: inline-block;
width: 0;
height: 0;
margin-left: 2px;
vertical-align: middle;
2016-11-02 14:34:17 -04:00
border-top: 5px dashed;
border-right: 5px solid transparent;
border-left: 5px solid transparent;
2016-02-19 21:46:18 -05:00
color: $gray-darkest;
}
}
.select2-chosen {
2016-02-19 21:46:18 -05:00
margin-right: 15px;
}
2016-02-19 21:46:18 -05:00
&:hover {
2016-12-12 17:26:21 -05:00
background-color: $white-normal;
2016-02-19 21:46:18 -05:00
border-color: $border-white-normal;
2016-02-22 12:59:32 -05:00
color: $gl-text-color;
}
}
}
.select2-drop {
2016-11-30 08:25:25 -05:00
box-shadow: $select2-drop-shadow1 0 0 1px 0, $select2-drop-shadow2 0 2px 18px 0;
2016-09-09 12:59:36 -04:00
border-radius: $border-radius-default;
2016-02-22 09:58:04 -05:00
border: none;
min-width: 175px;
}
.select2-results .select2-result-label,
.select2-more-results {
2016-02-22 09:58:04 -05:00
padding: 10px 15px;
}
.select2-drop {
2016-11-30 08:25:25 -05:00
color: $gl-grayish-blue;
}
.select2-highlighted {
background: $gl-link-color !important;
}
.select2-results li.select2-result-with-children > .select2-result-label {
font-weight: 600;
2016-02-22 12:59:32 -05:00
color: $gl-text-color;
}
2016-02-22 09:58:04 -05:00
.select2-container-active {
.select2-choice,
.select2-choices {
2016-09-09 12:59:36 -04:00
box-shadow: none;
2016-02-22 09:58:04 -05:00
}
}
.select2-dropdown-open {
.select2-choice {
border-color: $border-white-normal;
outline: 0;
background-image: none;
background-color: $white-dark;
2016-09-09 12:59:36 -04:00
box-shadow: $gl-btn-active-gradient;
2016-02-22 09:58:04 -05:00
}
}
2015-12-02 08:24:44 -05:00
.select2-container-multi {
.select2-choices {
2016-09-09 12:59:36 -04:00
border-radius: $border-radius-default;
2015-12-02 08:24:44 -05:00
border-color: $input-border;
2016-02-22 09:58:04 -05:00
background: none;
2015-12-02 08:24:44 -05:00
.select2-search-field input {
2016-08-31 10:28:58 -04:00
padding: 5px $gl-padding / 2;
2015-12-02 08:24:44 -05:00
font-size: 13px;
height: auto;
font-family: inherit;
font-size: inherit;
}
2015-12-02 08:24:44 -05:00
.select2-search-choice {
margin: 5px 0 0 8px;
2015-12-02 08:24:44 -05:00
box-shadow: none;
border-color: $input-border;
color: $gl-text-color;
line-height: 15px;
2016-12-12 17:26:21 -05:00
background-color: $gray-light;
2016-02-22 09:58:04 -05:00
background-image: none;
2015-12-02 08:24:44 -05:00
.select2-search-choice-close {
2016-02-22 09:58:04 -05:00
top: 4px;
left: 3px;
2015-12-02 08:24:44 -05:00
}
&.select2-search-choice-focus {
border-color: $gl-text-color;
}
}
}
2016-02-22 09:58:04 -05:00
&.select2-container-active .select2-choices,
&.select2-dropdown-open .select2-choices {
border-color: $border-white-normal;
2016-09-09 12:59:36 -04:00
box-shadow: $gl-btn-active-gradient;
2016-02-19 21:46:18 -05:00
}
}
.select2-drop-active {
2016-02-22 09:58:04 -05:00
margin-top: 6px;
font-size: 14px;
&.select2-drop-above {
margin-bottom: 8px;
}
.select2-results {
max-height: 350px;
.select2-highlighted {
2015-03-06 22:02:12 -05:00
background: $gl-primary;
}
}
}
2016-02-22 09:58:04 -05:00
.select2-search {
padding: 15px 15px 5px;
.select2-drop-auto-width & {
padding: 15px 15px 5px;
}
2016-02-19 21:46:18 -05:00
}
2016-02-22 09:58:04 -05:00
.select2-search input {
padding: 2px 25px 2px 5px;
2016-11-30 08:25:25 -05:00
background: $white-light image-url('select2.png');
2016-02-22 09:58:04 -05:00
background-repeat: no-repeat;
background-position: right 0 bottom 6px;
2016-02-22 09:58:04 -05:00
border: 1px solid $input-border;
2016-09-09 12:59:36 -04:00
border-radius: $border-radius-default;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
2016-02-22 09:58:04 -05:00
&:focus {
border-color: $input-border-focus;
}
2016-02-19 21:46:18 -05:00
}
2016-02-22 09:58:04 -05:00
.select2-search input.select2-active {
2016-11-30 08:25:25 -05:00
background-color: $white-light;
background-image: image-url('select2-spinner.gif') !important;
2016-02-22 09:58:04 -05:00
background-repeat: no-repeat;
background-position: right 5px center !important;
background-size: 16px 16px !important;
}
2016-02-22 09:58:04 -05:00
.select2-results .select2-no-results,
.select2-results .select2-searching,
.select2-results .select2-ajax-error,
.select2-results .select2-selection-limit {
background: $gray-light;
display: list-item;
padding: 10px 15px;
}
.select2-results {
margin: 0;
padding: 10px 0;
}
.ajax-users-select {
width: 400px;
&.input-large {
width: 210px;
}
&.input-clamp {
max-width: 100%;
}
}
.select2-highlighted {
.group-result {
.group-path {
2016-11-30 08:25:25 -05:00
color: $white-light;
}
}
}
.group-result {
.group-image {
float: left;
}
.group-name {
font-weight: bold;
}
.group-path {
2016-11-30 08:25:25 -05:00
color: $group-path-color;
}
}
.user-result {
min-height: 24px;
.user-image {
float: left;
}
&.no-username {
.user-name {
line-height: 24px;
}
}
}
.namespace-result {
.namespace-kind {
2016-11-30 08:25:25 -05:00
color: $namespace-kind-color;
font-weight: normal;
}
.namespace-path {
margin-left: 10px;
font-weight: bolder;
}
}
.ajax-users-dropdown {
min-width: 250px !important;
}