2017-03-26 21:09:19 -04:00
|
|
|
//
|
|
|
|
// Search input and autocomplete
|
|
|
|
//
|
|
|
|
|
|
|
|
.search {
|
2018-10-23 11:40:39 -04:00
|
|
|
position: relative;
|
2019-12-03 03:12:54 -05:00
|
|
|
z-index: 2;
|
2018-10-23 11:40:39 -04:00
|
|
|
flex-grow: 1;
|
2019-12-03 03:12:54 -05:00
|
|
|
height: $sp-10;
|
2019-12-04 04:39:30 -05:00
|
|
|
padding: $sp-2;
|
|
|
|
transition: padding linear 100ms;
|
2017-03-26 21:09:19 -04:00
|
|
|
|
|
|
|
@include mq(md) {
|
2019-12-04 04:39:30 -05:00
|
|
|
position: relative !important;
|
|
|
|
width: auto !important;
|
|
|
|
height: 100% !important;
|
|
|
|
padding: 0;
|
|
|
|
transition: none;
|
2017-03-26 21:09:19 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-input-wrap {
|
2019-12-03 03:12:54 -05:00
|
|
|
position: relative;
|
2019-12-04 04:39:30 -05:00
|
|
|
height: $sp-8;
|
|
|
|
transition: height linear 100ms;
|
2019-05-12 08:12:00 -04:00
|
|
|
|
|
|
|
@include mq(md) {
|
2019-12-04 04:39:30 -05:00
|
|
|
height: 100% !important;
|
2019-12-03 03:12:54 -05:00
|
|
|
transition: none;
|
2019-05-12 08:12:00 -04:00
|
|
|
}
|
2017-03-26 21:09:19 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
.search-input {
|
2019-12-03 03:12:54 -05:00
|
|
|
position: absolute;
|
2017-11-08 11:23:05 -05:00
|
|
|
width: 100%;
|
2019-12-03 03:12:54 -05:00
|
|
|
height: 100%;
|
|
|
|
padding-top: $sp-2;
|
|
|
|
padding-right: $gutter-spacing-sm;
|
|
|
|
padding-bottom: $sp-2;
|
|
|
|
padding-left: #{$gutter-spacing-sm + $sp-4 * 1.2 + $sp-2};
|
2019-05-18 20:41:40 -04:00
|
|
|
background-color: $search-background-color;
|
2017-03-26 21:09:19 -04:00
|
|
|
border-top: 0;
|
|
|
|
border-right: 0;
|
2017-06-04 17:50:01 -04:00
|
|
|
border-bottom: 0;
|
2017-03-26 21:09:19 -04:00
|
|
|
border-left: 0;
|
2019-12-03 03:12:54 -05:00
|
|
|
border-radius: $border-radius;
|
|
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
|
2019-05-18 20:41:40 -04:00
|
|
|
@include fs-4;
|
2017-03-26 21:09:19 -04:00
|
|
|
|
2019-12-03 03:12:54 -05:00
|
|
|
@include mq(md) {
|
|
|
|
max-width: $search-results-width;
|
2019-12-04 04:39:30 -05:00
|
|
|
padding-top: $gutter-spacing-sm;
|
2019-12-03 03:12:54 -05:00
|
|
|
padding-left: #{$gutter-spacing + $sp-5};
|
2019-12-04 04:39:30 -05:00
|
|
|
padding-bottom: $gutter-spacing-sm;
|
2019-12-03 03:12:54 -05:00
|
|
|
background-color: $body-background-color;
|
|
|
|
border-radius: 0;
|
|
|
|
box-shadow: none;
|
2019-12-04 04:39:30 -05:00
|
|
|
transition: width ease 200ms;
|
2019-12-03 03:12:54 -05:00
|
|
|
@include fs-3;
|
|
|
|
}
|
|
|
|
|
2017-03-26 21:09:19 -04:00
|
|
|
&:focus {
|
|
|
|
outline: 0;
|
|
|
|
|
2019-12-03 03:12:54 -05:00
|
|
|
+ .search-label .search-icon {
|
2018-11-18 11:07:45 -05:00
|
|
|
fill: $link-color;
|
2017-03-26 21:09:19 -04:00
|
|
|
}
|
|
|
|
}
|
2019-12-03 03:12:54 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
.search-label {
|
|
|
|
position: absolute;
|
|
|
|
display: flex;
|
|
|
|
height: 100%;
|
|
|
|
padding-left: $gutter-spacing-sm;
|
2018-10-24 14:05:29 -04:00
|
|
|
|
|
|
|
@include mq(md) {
|
2019-12-03 03:12:54 -05:00
|
|
|
padding-left: $gutter-spacing;
|
2018-10-24 14:05:29 -04:00
|
|
|
}
|
2017-03-26 21:09:19 -04:00
|
|
|
|
2019-12-03 03:12:54 -05:00
|
|
|
.search-icon {
|
|
|
|
width: #{$sp-4 * 1.2};
|
|
|
|
height: #{$sp-4 * 1.2};
|
|
|
|
align-self: center;
|
|
|
|
fill: $grey-dk-000;
|
|
|
|
}
|
2017-03-26 21:09:19 -04:00
|
|
|
}
|
|
|
|
|
2019-07-21 10:09:29 -04:00
|
|
|
.search-results {
|
2019-05-12 08:12:00 -04:00
|
|
|
position: absolute;
|
2019-12-04 04:39:30 -05:00
|
|
|
left: 0;
|
2019-08-13 17:24:23 -04:00
|
|
|
display: none;
|
2019-05-12 08:12:00 -04:00
|
|
|
width: 100%;
|
2019-12-04 04:39:30 -05:00
|
|
|
max-height: calc(100% - #{$sp-10});
|
2019-12-03 03:12:54 -05:00
|
|
|
overflow-y: auto;
|
2019-05-18 20:41:40 -04:00
|
|
|
background: $search-background-color;
|
2019-12-03 03:12:54 -05:00
|
|
|
border-bottom-right-radius: $border-radius;
|
2019-12-03 03:20:22 -05:00
|
|
|
border-bottom-left-radius: $border-radius;
|
2019-05-12 08:12:00 -04:00
|
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
|
|
|
|
|
2019-05-18 17:07:02 -04:00
|
|
|
@include mq(md) {
|
|
|
|
width: $search-results-width;
|
2019-12-04 04:39:30 -05:00
|
|
|
max-height: calc(100vh - 200%) !important;
|
2019-05-18 17:07:02 -04:00
|
|
|
}
|
2019-05-12 08:12:00 -04:00
|
|
|
}
|
|
|
|
|
2017-03-26 21:09:19 -04:00
|
|
|
.search-results-list {
|
|
|
|
padding-left: 0;
|
|
|
|
margin-bottom: $sp-1;
|
|
|
|
list-style: none;
|
2019-05-12 08:12:00 -04:00
|
|
|
@include fs-4;
|
|
|
|
|
|
|
|
@include mq(md) {
|
|
|
|
@include fs-3;
|
|
|
|
}
|
2017-03-26 21:09:19 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
.search-results-list-item {
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
2019-05-18 17:07:02 -04:00
|
|
|
.search-result {
|
2017-03-26 21:09:19 -04:00
|
|
|
display: block;
|
|
|
|
padding-top: $sp-1;
|
2019-08-13 17:24:36 -04:00
|
|
|
padding-right: $sp-3;
|
2017-03-26 21:09:19 -04:00
|
|
|
padding-bottom: $sp-1;
|
|
|
|
padding-left: $sp-3;
|
|
|
|
|
2019-08-13 17:24:36 -04:00
|
|
|
&:hover,
|
|
|
|
&.active {
|
2019-08-10 15:24:36 -04:00
|
|
|
background-color: $feedback-color;
|
2019-05-18 17:07:02 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
@include mq(md) {
|
|
|
|
padding-right: $sp-4;
|
2019-08-13 17:24:36 -04:00
|
|
|
padding-left: $sp-4;
|
2019-05-18 17:07:02 -04:00
|
|
|
}
|
2019-08-13 17:24:36 -04:00
|
|
|
}
|
2019-05-18 17:07:02 -04:00
|
|
|
|
2019-08-13 17:24:36 -04:00
|
|
|
.search-result-title {
|
|
|
|
display: block;
|
|
|
|
padding-top: $sp-2;
|
|
|
|
padding-right: $sp-4;
|
|
|
|
padding-bottom: $sp-2;
|
|
|
|
|
|
|
|
@include mq(sm) {
|
|
|
|
display: inline-block;
|
|
|
|
width: 40%;
|
|
|
|
word-wrap: break-word;
|
|
|
|
vertical-align: top;
|
2019-05-18 17:07:02 -04:00
|
|
|
}
|
2019-08-13 17:24:36 -04:00
|
|
|
}
|
2019-05-18 17:07:02 -04:00
|
|
|
|
2019-08-13 17:24:36 -04:00
|
|
|
.search-result-rel-url {
|
|
|
|
display: block;
|
|
|
|
overflow: hidden;
|
|
|
|
color: $search-result-preview-color;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
@include fs-1;
|
|
|
|
}
|
2019-05-18 17:07:02 -04:00
|
|
|
|
2019-08-13 17:24:36 -04:00
|
|
|
.search-result-preview {
|
|
|
|
display: block;
|
|
|
|
padding-top: $sp-2;
|
|
|
|
padding-bottom: $sp-2;
|
|
|
|
padding-left: $sp-4;
|
|
|
|
color: $search-result-preview-color;
|
|
|
|
border-left: $border;
|
|
|
|
border-left-color: $border-color;
|
|
|
|
@include fs-2;
|
|
|
|
|
|
|
|
@include mq(sm) {
|
|
|
|
display: inline-block;
|
|
|
|
width: 60%;
|
|
|
|
vertical-align: top;
|
2017-03-26 21:09:19 -04:00
|
|
|
}
|
2017-03-24 09:47:37 -04:00
|
|
|
}
|
2019-08-13 17:24:36 -04:00
|
|
|
|
|
|
|
.search-result-highlight {
|
|
|
|
font-weight: bold;
|
|
|
|
color: $link-color;
|
|
|
|
}
|
2019-07-21 15:56:50 -04:00
|
|
|
|
|
|
|
.search-button {
|
|
|
|
position: fixed;
|
2019-07-21 16:35:06 -04:00
|
|
|
right: $sp-4;
|
|
|
|
bottom: $sp-4;
|
2019-07-21 16:38:41 -04:00
|
|
|
display: flex;
|
2019-07-21 15:56:50 -04:00
|
|
|
width: $sp-9;
|
|
|
|
height: $sp-9;
|
|
|
|
background-color: $search-background-color;
|
|
|
|
border-radius: #{$sp-9 / 2};
|
|
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
2019-07-22 15:50:15 -04:00
|
|
|
|
|
|
|
.search-results,
|
|
|
|
.search-button {
|
2019-08-01 07:12:02 -04:00
|
|
|
border: 1px solid rgba($link-color, 0.3);
|
2019-07-22 15:50:15 -04:00
|
|
|
}
|
|
|
|
|
2019-12-03 03:12:54 -05:00
|
|
|
.search-overlay {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
2019-12-03 03:21:35 -05:00
|
|
|
z-index: 1;
|
2019-12-03 03:12:54 -05:00
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
background-color: rgba(0, 0, 0, 0.2);
|
|
|
|
opacity: 0;
|
2019-12-03 04:55:36 -05:00
|
|
|
transition: opacity ease 200ms, width 0s 200ms, height 0s 200ms;
|
2019-12-03 03:12:54 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
.search-active {
|
2019-12-04 04:39:30 -05:00
|
|
|
.search {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
padding: 0;
|
|
|
|
}
|
2019-12-03 03:12:54 -05:00
|
|
|
|
|
|
|
.search-input-wrap {
|
2019-12-04 04:39:30 -05:00
|
|
|
height: $sp-10;
|
2019-12-03 03:12:54 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
.search-input {
|
|
|
|
border-radius: 0;
|
|
|
|
box-shadow: none;
|
|
|
|
|
|
|
|
@include mq(md) {
|
|
|
|
width: $search-results-width;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-results {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-overlay {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
opacity: 1;
|
2019-12-03 04:52:17 -05:00
|
|
|
transition: opacity ease 200ms, width 0s, height 0s;
|
2019-12-03 03:12:54 -05:00
|
|
|
}
|
2019-12-04 04:39:30 -05:00
|
|
|
|
|
|
|
@include mq(md) {
|
|
|
|
.main {
|
|
|
|
position: absolute;
|
|
|
|
height: 100vh;
|
|
|
|
width: 100vw;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
}
|
2019-07-22 15:50:15 -04:00
|
|
|
}
|