debian-mirror-gitlab/app/assets/stylesheets/pages/search.scss

299 lines
5.7 KiB
SCSS
Raw Normal View History

2018-11-18 11:00:15 +05:30
$search-dropdown-max-height: 400px;
$search-avatar-size: 16px;
2015-04-26 12:48:37 +05:30
.search-results {
.search-result-row {
2016-06-02 11:05:42 +05:30
border-bottom: 1px solid $border-color;
padding-bottom: $gl-padding;
margin-bottom: $gl-padding;
&:last-child {
2018-03-17 18:26:18 +05:30
border-bottom: 0;
2016-06-02 11:05:42 +05:30
}
}
2017-08-17 22:00:37 +05:30
.blob-result {
margin: 5px 0;
}
}
.search form:hover,
.file-finder-input:hover,
.issuable-search-form:hover,
.search-text-input:hover,
2018-11-08 19:23:39 +05:30
.form-control:hover,
:not[readonly] {
2018-11-20 20:47:30 +05:30
border-color: lighten($blue-300, 20%);
box-shadow: 0 0 4px lighten($dropdown-input-focus-shadow, 20%);
2017-08-17 22:00:37 +05:30
}
2018-11-18 11:00:15 +05:30
input[type='checkbox']:hover {
2018-11-20 20:47:30 +05:30
box-shadow: 0 0 2px 2px lighten($dropdown-input-focus-shadow, 20%),
0 0 0 1px lighten($dropdown-input-focus-shadow, 20%);
2016-06-02 11:05:42 +05:30
}
.search {
2018-11-08 19:23:39 +05:30
margin: 0 8px;
2016-06-02 11:05:42 +05:30
form {
@extend .form-control;
margin: 0;
padding: 4px;
width: $search-input-width;
line-height: 24px;
2018-03-17 18:26:18 +05:30
height: 32px;
border: 0;
border-radius: $border-radius-default;
2018-11-18 11:00:15 +05:30
transition: border-color ease-in-out $default-transition-duration,
2019-12-04 20:38:33 +05:30
background-color ease-in-out $default-transition-duration;
@include media-breakpoint-up(xl) {
width: $search-input-xl-width;
}
2017-08-17 22:00:37 +05:30
&:hover {
2018-03-17 18:26:18 +05:30
box-shadow: none;
2017-08-17 22:00:37 +05:30
}
2016-06-02 11:05:42 +05:30
}
.search-input {
2018-03-17 18:26:18 +05:30
border: 0;
2016-06-02 11:05:42 +05:30
font-size: 14px;
2017-08-17 22:00:37 +05:30
padding: 0 20px 0 0;
2016-06-02 11:05:42 +05:30
margin-left: 5px;
line-height: 25px;
width: 98%;
2020-04-22 19:07:51 +05:30
color: $white;
2018-03-17 18:26:18 +05:30
background: none;
transition: color ease-in-out $default-transition-duration;
2016-06-02 11:05:42 +05:30
}
2018-03-17 18:26:18 +05:30
.search-input::placeholder {
transition: color ease-in-out $default-transition-duration;
2016-06-02 11:05:42 +05:30
}
.search-input-container {
display: flex;
position: relative;
}
.search-input-wrap {
2019-07-07 11:18:12 +05:30
width: 100%;
2017-08-17 22:00:37 +05:30
.search-icon,
.clear-icon {
2016-06-02 11:05:42 +05:30
position: absolute;
right: 5px;
2018-03-17 18:26:18 +05:30
top: 4px;
2016-06-02 11:05:42 +05:30
}
.search-icon {
2018-03-17 18:26:18 +05:30
transition: color $default-transition-duration;
2016-06-02 11:05:42 +05:30
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
2019-07-07 11:18:12 +05:30
user-select: none;
2016-06-02 11:05:42 +05:30
}
.clear-icon {
display: none;
}
// Rewrite position. Dropdown menu should be relative to .search-input-container
.dropdown {
position: static;
}
.dropdown-header {
2020-11-24 15:15:51 +05:30
// Necessary because deprecatedJQueryDropdown doesn't support a second style of headers
2018-11-18 11:00:15 +05:30
font-weight: $gl-font-weight-bold;
color: $gl-text-color;
font-size: $gl-font-size;
line-height: 16px;
2016-06-02 11:05:42 +05:30
}
// Custom dropdown positioning
.dropdown-menu {
left: -5px;
2018-11-18 11:00:15 +05:30
max-height: $search-dropdown-max-height;
overflow: auto;
@include media-breakpoint-up(xl) {
2019-12-04 20:38:33 +05:30
width: $search-input-xl-width;
2018-11-18 11:00:15 +05:30
}
2016-06-02 11:05:42 +05:30
}
.dropdown-content {
2018-11-18 11:00:15 +05:30
max-height: $search-dropdown-max-height - 18px;
2016-06-02 11:05:42 +05:30
}
}
&.search-active {
form {
@extend .form-control:focus;
2018-11-20 20:47:30 +05:30
border-color: $blue-300;
2018-03-17 18:26:18 +05:30
box-shadow: none;
.search-input-wrap {
.search-icon,
.clear-icon {
color: $gl-text-color-tertiary;
transition: color ease-in-out $default-transition-duration;
}
}
2016-06-02 11:05:42 +05:30
2018-03-17 18:26:18 +05:30
.search-input {
color: $gl-text-color;
transition: color ease-in-out $default-transition-duration;
}
2016-06-02 11:05:42 +05:30
2018-03-17 18:26:18 +05:30
.search-input::placeholder {
color: $gl-text-color-tertiary;
2016-06-02 11:05:42 +05:30
}
}
}
&.has-value {
.search-icon {
display: none;
}
.clear-icon {
cursor: pointer;
display: block;
}
}
2018-11-18 11:00:15 +05:30
.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%;
2018-11-20 20:47:30 +05:30
border: 1px solid $gray-normal;
2015-04-26 12:48:37 +05:30
}
}
2015-09-25 12:07:36 +05:30
2019-10-12 21:52:04 +05:30
.search-field-holder,
.project-filter-form {
flex: 1 0 auto;
position: relative;
2016-06-02 11:05:42 +05:30
2019-10-12 21:52:04 +05:30
.search-holder & {
2016-06-02 11:05:42 +05:30
margin-right: 0;
2018-11-08 19:23:39 +05:30
@include media-breakpoint-up(sm) {
2016-06-02 11:05:42 +05:30
margin-right: 5px;
}
}
2015-09-25 12:07:36 +05:30
2021-01-03 14:25:43 +05:30
.search-clear {
position: absolute;
right: 10px;
top: 9px;
padding: 0;
line-height: 0;
background: none;
border: 0;
}
2019-10-12 21:52:04 +05:30
2016-06-02 11:05:42 +05:30
.search-icon {
position: absolute;
left: 10px;
2021-01-03 14:25:43 +05:30
top: 9px;
2016-06-02 11:05:42 +05:30
color: $gray-darkest;
pointer-events: none;
}
2019-12-04 20:38:33 +05:30
.search-text-input {
2016-06-02 11:05:42 +05:30
padding-left: $gl-padding + 15px;
padding-right: $gl-padding + 15px;
}
2019-10-12 21:52:04 +05:30
}
.search-holder {
@include media-breakpoint-up(sm) {
display: flex;
}
2016-06-02 11:05:42 +05:30
2017-08-17 22:00:37 +05:30
.btn-search,
2019-10-12 21:52:04 +05:30
.btn-success,
.dropdown-menu-toggle {
2016-06-02 11:05:42 +05:30
width: 100%;
margin-top: 5px;
2018-11-08 19:23:39 +05:30
@include media-breakpoint-up(sm) {
2016-06-02 11:05:42 +05:30
width: auto;
margin-top: 0;
margin-left: 5px;
}
}
.dropdown {
2018-11-08 19:23:39 +05:30
@include media-breakpoint-up(sm) {
2016-06-02 11:05:42 +05:30
margin-left: 5px;
margin-right: 5px;
}
}
.dropdown-menu-toggle {
2018-11-08 19:23:39 +05:30
@include media-breakpoint-up(sm) {
2016-08-24 12:49:21 +05:30
width: 180px;
2016-06-02 11:05:42 +05:30
margin-top: 0;
}
2015-09-25 12:07:36 +05:30
}
}
2016-06-02 11:05:42 +05:30
.search-clear {
color: $gray-darkest;
&:hover,
&:focus {
2018-11-20 20:47:30 +05:30
color: $blue-600;
2016-06-02 11:05:42 +05:30
}
}
2019-09-04 21:01:54 +05:30
2019-10-12 21:52:04 +05:30
.search-page-form {
.dropdown-menu-toggle,
.btn-search {
width: 100%;
}
.dropdown-menu-toggle {
@include media-breakpoint-up(lg) {
width: 240px;
}
}
.btn-search {
@include media-breakpoint-up(lg) {
width: auto;
}
}
}
2021-01-03 14:25:43 +05:30
.ref-truncated {
@include str-truncated(10em);
}
2019-09-04 21:01:54 +05:30
// Disable webkit input icons, link to solution: https://stackoverflow.com/questions/9421551/how-do-i-remove-all-default-webkit-search-field-styling
/* stylelint-disable property-no-vendor-prefix */
input[type='search']::-webkit-search-decoration,
input[type='search']::-webkit-search-cancel-button,
input[type='search']::-webkit-search-results-button,
input[type='search']::-webkit-search-results-decoration {
-webkit-appearance: none;
}
/* stylelint-enable */