gitlab-org--gitlab-foss/app/assets/stylesheets/pages/search.scss

247 lines
4.6 KiB
SCSS
Raw Normal View History

.search-results {
.search-result-row {
border-bottom: 1px solid $border-color;
padding-bottom: $gl-padding;
margin-bottom: $gl-padding;
&:last-child {
2017-11-02 19:59:51 -04:00
border-bottom: 0;
}
}
2016-11-10 12:27:09 -05:00
.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($dropdown-input-focus-border, 20%);
box-shadow: 0 0 4px lighten($search-input-focus-shadow-color, 20%);
}
input[type="checkbox"]:hover {
2017-01-03 09:45:11 -05:00
box-shadow: 0 0 2px 2px lighten($search-input-focus-shadow-color, 20%), 0 0 0 1px lighten($search-input-focus-shadow-color, 20%);
}
.search {
margin: 0 8px;
form {
@extend .form-control;
margin: 0;
padding: 4px;
width: $search-input-width;
2016-03-26 18:51:25 -04:00
line-height: 24px;
2017-09-21 15:35:03 -04:00
height: 32px;
border: 0;
border-radius: $border-radius-default;
2017-09-25 13:29:45 -04:00
transition: border-color ease-in-out $default-transition-duration, background-color ease-in-out $default-transition-duration;
&:hover {
2017-09-21 15:35:03 -04:00
box-shadow: none;
}
}
2017-09-21 15:35:03 -04:00
.location-badge {
2018-04-16 17:15:05 -04:00
white-space: nowrap;
2017-09-28 19:51:29 -04:00
height: 32px;
2017-09-21 15:35:03 -04:00
font-size: 12px;
margin: -4px 4px -4px -4px;
line-height: 25px;
padding: 4px 8px;
2017-09-25 13:29:45 -04:00
border-radius: $border-radius-default 0 0 $border-radius-default;
transition: border-color ease-in-out $default-transition-duration;
}
.search-input {
2017-11-02 19:59:51 -04:00
border: 0;
font-size: 14px;
2016-11-14 10:45:35 -05:00
padding: 0 20px 0 0;
2016-03-09 15:52:15 -05:00
margin-left: 5px;
line-height: 25px;
width: 98%;
2017-09-21 15:35:03 -04:00
color: $white-light;
background: none;
2017-09-25 13:29:45 -04:00
transition: color ease-in-out $default-transition-duration;
}
2017-09-21 15:35:03 -04:00
.search-input::placeholder {
2017-09-25 13:29:45 -04:00
transition: color ease-in-out $default-transition-duration;
}
.search-input-container {
display: flex;
2016-03-26 17:52:16 -04:00
position: relative;
}
.search-input-wrap {
.search-icon,
.clear-icon {
2016-03-09 15:52:15 -05:00
position: absolute;
right: 5px;
top: 4px;
2016-03-09 15:52:15 -05:00
}
2016-03-21 17:00:53 -04:00
.search-icon {
2017-09-25 13:29:45 -04:00
transition: color $default-transition-duration;
2016-03-21 17:00:53 -04:00
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
.clear-icon {
display: none;
}
2016-03-26 17:52:16 -04:00
// Rewrite position. Dropdown menu should be relative to .search-input-container
.dropdown {
position: static;
}
.dropdown-header {
text-transform: uppercase;
font-size: 11px;
2016-03-09 15:52:15 -05:00
}
2016-03-24 14:44:00 -04:00
// Custom dropdown positioning
.dropdown-menu {
left: -5px;
}
.dropdown-content {
max-height: 302px;
2016-03-24 14:44:00 -04:00
}
}
2016-03-21 17:00:53 -04:00
&.search-active {
form {
@extend .form-control:focus;
border-color: $dropdown-input-focus-border;
2017-09-21 15:35:03 -04:00
box-shadow: none;
.search-input-wrap {
.search-icon,
.clear-icon {
color: $gl-text-color-tertiary;
2017-09-25 13:29:45 -04:00
transition: color ease-in-out $default-transition-duration;
2017-09-21 15:35:03 -04:00
}
}
.search-input {
color: $gl-text-color;
2017-09-25 13:29:45 -04:00
transition: color ease-in-out $default-transition-duration;
2017-09-21 15:35:03 -04:00
}
.search-input::placeholder {
color: $gl-text-color-tertiary;
}
2016-03-21 17:00:53 -04:00
}
.location-badge {
2017-09-25 13:29:45 -04:00
transition: all $default-transition-duration;
2017-09-21 15:35:03 -04:00
background-color: $nav-badge-bg;
border-color: $border-color;
2016-03-21 17:00:53 -04:00
}
}
2016-03-21 17:00:53 -04:00
&.has-value {
.search-icon {
display: none;
}
2016-03-21 17:00:53 -04:00
.clear-icon {
cursor: pointer;
display: block;
2016-03-21 17:00:53 -04:00
}
}
2016-03-24 13:55:50 -04:00
&.has-location-badge {
.search-input-wrap {
width: 68%;
2016-03-24 13:55:50 -04:00
}
}
}
2016-04-15 09:13:21 -04:00
.search-holder {
2018-04-09 11:26:28 -04:00
@include media-breakpoint-up(sm) {
2016-04-15 10:32:30 -04:00
display: -webkit-flex;
2016-04-18 04:22:36 -04:00
display: flex;
2016-04-15 10:32:30 -04:00
}
2016-04-15 09:13:21 -04:00
.search-field-holder,
.project-filter-form {
2016-04-18 04:22:36 -04:00
-webkit-flex: 1 0 auto;
flex: 1 0 auto;
2016-04-15 09:13:21 -04:00
position: relative;
2016-04-15 10:32:30 -04:00
margin-right: 0;
2018-04-09 11:26:28 -04:00
@include media-breakpoint-up(sm) {
2016-04-15 10:32:30 -04:00
margin-right: 5px;
}
2016-04-15 09:13:21 -04:00
}
2016-04-15 10:55:31 -04:00
.search-icon {
position: absolute;
left: 10px;
top: 10px;
color: $gray-darkest;
pointer-events: none;
}
.search-text-input,
.project-filter-form-field {
2016-04-15 10:55:31 -04:00
padding-left: $gl-padding + 15px;
padding-right: $gl-padding + 15px;
}
.btn-search,
.btn-new {
2016-04-15 10:32:30 -04:00
width: 100%;
margin-top: 5px;
2018-04-09 11:26:28 -04:00
@include media-breakpoint-up(sm) {
2016-04-15 10:32:30 -04:00
width: auto;
margin-top: 0;
margin-left: 5px;
}
}
.dropdown {
2018-04-09 11:26:28 -04:00
@include media-breakpoint-up(sm) {
2016-04-15 10:32:30 -04:00
margin-left: 5px;
margin-right: 5px;
}
}
.dropdown-menu-toggle {
width: 100%;
margin-top: 5px;
2018-04-09 11:26:28 -04:00
@include media-breakpoint-up(sm) {
width: 180px;
2016-04-15 10:32:30 -04:00
margin-top: 0;
}
2016-04-15 09:13:21 -04:00
}
}
2016-04-15 10:55:31 -04:00
.search-clear {
position: absolute;
right: 10px;
top: 10px;
padding: 0;
color: $gray-darkest;
line-height: 0;
background: none;
border: 0;
&:hover,
&:focus {
color: $gl-link-color;
}
}