7f8a520f8a
Rename btn-new, btn-create and btn-save to btn-success Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
264 lines
5 KiB
SCSS
264 lines
5 KiB
SCSS
$search-dropdown-max-height: 400px;
|
|
$search-avatar-size: 16px;
|
|
|
|
.search-results {
|
|
.search-result-row {
|
|
border-bottom: 1px solid $border-color;
|
|
padding-bottom: $gl-padding;
|
|
margin-bottom: $gl-padding;
|
|
|
|
&:last-child {
|
|
border-bottom: 0;
|
|
}
|
|
}
|
|
|
|
.blob-result {
|
|
margin: 5px 0;
|
|
}
|
|
}
|
|
|
|
.search form:hover,
|
|
.file-finder-input:hover,
|
|
.issuable-search-form:hover,
|
|
.search-text-input:hover,
|
|
.form-control:hover,
|
|
:not[readonly] {
|
|
border-color: lighten($blue-300, 20%);
|
|
box-shadow: 0 0 4px lighten($dropdown-input-focus-shadow, 20%);
|
|
}
|
|
|
|
input[type='checkbox']:hover {
|
|
box-shadow: 0 0 2px 2px lighten($dropdown-input-focus-shadow, 20%),
|
|
0 0 0 1px lighten($dropdown-input-focus-shadow, 20%);
|
|
}
|
|
|
|
.search {
|
|
margin: 0 8px;
|
|
|
|
form {
|
|
@extend .form-control;
|
|
margin: 0;
|
|
padding: 4px;
|
|
width: $search-input-width;
|
|
line-height: 24px;
|
|
height: 32px;
|
|
border: 0;
|
|
border-radius: $border-radius-default;
|
|
transition: border-color ease-in-out $default-transition-duration,
|
|
background-color ease-in-out $default-transition-duration,
|
|
width ease-in-out $default-transition-duration;
|
|
|
|
&:hover {
|
|
box-shadow: none;
|
|
}
|
|
}
|
|
|
|
.search-input {
|
|
border: 0;
|
|
font-size: 14px;
|
|
padding: 0 20px 0 0;
|
|
margin-left: 5px;
|
|
line-height: 25px;
|
|
width: 98%;
|
|
color: $white-light;
|
|
background: none;
|
|
transition: color ease-in-out $default-transition-duration;
|
|
}
|
|
|
|
.search-input::placeholder {
|
|
transition: color ease-in-out $default-transition-duration;
|
|
}
|
|
|
|
.search-input-container {
|
|
display: flex;
|
|
position: relative;
|
|
}
|
|
|
|
.search-input-wrap {
|
|
.search-icon,
|
|
.clear-icon {
|
|
position: absolute;
|
|
right: 5px;
|
|
top: 4px;
|
|
}
|
|
|
|
.search-icon {
|
|
transition: color $default-transition-duration;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
}
|
|
|
|
.clear-icon {
|
|
display: none;
|
|
}
|
|
|
|
// Rewrite position. Dropdown menu should be relative to .search-input-container
|
|
.dropdown {
|
|
position: static;
|
|
}
|
|
|
|
.dropdown-header {
|
|
// Necessary because glDropdown doesn't support a second style of headers
|
|
font-weight: $gl-font-weight-bold;
|
|
// .dropdown-menu li has 1px side padding
|
|
padding: $gl-padding-8 17px;
|
|
color: $gl-text-color;
|
|
font-size: $gl-font-size;
|
|
line-height: 16px;
|
|
}
|
|
|
|
// Custom dropdown positioning
|
|
.dropdown-menu {
|
|
left: -5px;
|
|
max-height: $search-dropdown-max-height;
|
|
overflow: auto;
|
|
|
|
@include media-breakpoint-up(xl) {
|
|
width: $search-input-active-width;
|
|
}
|
|
}
|
|
|
|
.dropdown-content {
|
|
max-height: $search-dropdown-max-height - 18px;
|
|
}
|
|
}
|
|
|
|
&.search-active {
|
|
form {
|
|
@extend .form-control:focus;
|
|
border-color: $blue-300;
|
|
box-shadow: none;
|
|
|
|
@include media-breakpoint-up(xl) {
|
|
width: $search-input-active-width;
|
|
}
|
|
|
|
.search-input-wrap {
|
|
.search-icon,
|
|
.clear-icon {
|
|
color: $gl-text-color-tertiary;
|
|
transition: color ease-in-out $default-transition-duration;
|
|
}
|
|
}
|
|
|
|
.search-input {
|
|
color: $gl-text-color;
|
|
transition: color ease-in-out $default-transition-duration;
|
|
}
|
|
|
|
.search-input::placeholder {
|
|
color: $gl-text-color-tertiary;
|
|
}
|
|
}
|
|
}
|
|
|
|
&.has-value {
|
|
.search-icon {
|
|
display: none;
|
|
}
|
|
|
|
.clear-icon {
|
|
cursor: pointer;
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
.inline-search-icon {
|
|
position: relative;
|
|
margin-right: 4px;
|
|
color: $gl-text-color-secondary;
|
|
}
|
|
|
|
.identicon,
|
|
.search-item-avatar {
|
|
flex-basis: $search-avatar-size;
|
|
flex-shrink: 0;
|
|
margin-right: 4px;
|
|
}
|
|
|
|
.search-item-avatar {
|
|
width: $search-avatar-size;
|
|
height: $search-avatar-size;
|
|
border-radius: 50%;
|
|
border: 1px solid $gray-normal;
|
|
}
|
|
}
|
|
|
|
.search-holder {
|
|
@include media-breakpoint-up(sm) {
|
|
display: -webkit-flex;
|
|
display: flex;
|
|
}
|
|
|
|
.search-field-holder,
|
|
.project-filter-form {
|
|
-webkit-flex: 1 0 auto;
|
|
flex: 1 0 auto;
|
|
position: relative;
|
|
margin-right: 0;
|
|
|
|
@include media-breakpoint-up(sm) {
|
|
margin-right: 5px;
|
|
}
|
|
}
|
|
|
|
.search-icon {
|
|
position: absolute;
|
|
left: 10px;
|
|
top: 10px;
|
|
color: $gray-darkest;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.search-text-input,
|
|
.project-filter-form-field {
|
|
padding-left: $gl-padding + 15px;
|
|
padding-right: $gl-padding + 15px;
|
|
}
|
|
|
|
.btn-search,
|
|
.btn-success {
|
|
width: 100%;
|
|
margin-top: 5px;
|
|
|
|
@include media-breakpoint-up(sm) {
|
|
width: auto;
|
|
margin-top: 0;
|
|
margin-left: 5px;
|
|
}
|
|
}
|
|
|
|
.dropdown {
|
|
@include media-breakpoint-up(sm) {
|
|
margin-left: 5px;
|
|
margin-right: 5px;
|
|
}
|
|
}
|
|
|
|
.dropdown-menu-toggle {
|
|
width: 100%;
|
|
margin-top: 5px;
|
|
|
|
@include media-breakpoint-up(sm) {
|
|
width: 180px;
|
|
margin-top: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
.search-clear {
|
|
position: absolute;
|
|
right: 10px;
|
|
top: 10px;
|
|
padding: 0;
|
|
color: $gray-darkest;
|
|
line-height: 0;
|
|
background: none;
|
|
border: 0;
|
|
|
|
&:hover,
|
|
&:focus {
|
|
color: $blue-600;
|
|
}
|
|
}
|