notes/_sass/search.scss

115 lines
1.9 KiB
SCSS
Raw Normal View History

2017-03-27 01:09:19 +00:00
//
// Search input and autocomplete
//
.search {
2018-10-23 15:40:39 +00:00
position: relative;
z-index: 99;
2017-03-27 01:09:19 +00:00
display: none;
2018-10-23 15:40:39 +00:00
flex-grow: 1;
padding: $sp-2;
margin-bottom: $sp-3;
2018-10-24 18:05:29 +00:00
background-color: $white;
border-radius: 3px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07), 0 3px 10px rgba(0, 0, 0, 0.05);
2017-03-27 01:09:19 +00:00
@include mq(md) {
2017-06-04 21:50:01 +00:00
display: block;
padding-top: $sp-1;
2018-10-23 15:40:39 +00:00
padding-right: 0;
padding-bottom: 0;
2018-10-23 15:40:39 +00:00
padding-left: 0;
margin-bottom: 0;
background-color: transparent;
2018-10-24 18:05:29 +00:00
box-shadow: none;
2018-10-23 15:40:39 +00:00
}
&.nav-open {
display: block;
2017-03-27 01:09:19 +00:00
}
}
2017-03-24 13:47:37 +00:00
.search-results-wrap {
2017-03-27 01:09:19 +00:00
display: none;
&.active {
position: absolute;
2017-06-04 21:50:01 +00:00
top: $sp-1;
2017-03-27 01:09:19 +00:00
z-index: 100;
display: block;
2017-04-08 22:51:14 +00:00
width: 300px;
2017-06-04 21:50:01 +00:00
margin-top: $gutter-spacing;
2018-11-18 16:07:45 +00:00
background: lighten($body-background-color, 1%);
2017-03-27 01:09:19 +00:00
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 4px 14px rgba(0, 0, 0, 0.05);
}
}
.search-input-wrap {
display: flex;
2018-11-15 20:12:12 +00:00
background-color: $body-background-color;
2017-03-27 01:09:19 +00:00
}
.search-input {
2017-11-08 16:23:05 +00:00
width: 100%;
2017-03-27 01:09:19 +00:00
padding-top: $sp-1;
padding-bottom: $sp-1;
2018-11-15 20:12:12 +00:00
background-color: $body-background-color;
2017-03-27 01:09:19 +00:00
border-top: 0;
border-right: 0;
2017-06-04 21:50:01 +00:00
border-bottom: 0;
2017-03-27 01:09:19 +00:00
border-left: 0;
order: 2;
&:focus {
outline: 0;
2017-06-04 21:50:01 +00:00
box-shadow: none;
2017-03-27 01:09:19 +00:00
+ .search-icon {
2018-11-18 16:07:45 +00:00
fill: $link-color;
2017-03-27 01:09:19 +00:00
}
}
2018-10-24 18:05:29 +00:00
@include fs-5;
@include mq(sm) {
@include fs-3;
}
@include mq(md) {
@include fs-2;
}
2017-03-27 01:09:19 +00:00
}
.search-icon {
align-self: center;
margin-right: $sp-2;
fill: $grey-dk-000;
order: 1;
}
.search-results-list {
padding-left: 0;
2017-06-04 21:50:01 +00:00
margin-top: $sp-1;
2017-03-27 01:09:19 +00:00
margin-bottom: $sp-1;
list-style: none;
@include fs-3;
}
.search-results-list-item {
padding: 0;
margin: 0;
}
.search-results-link {
display: block;
padding-top: $sp-1;
padding-right: $sp-3;
padding-bottom: $sp-1;
padding-left: $sp-3;
&:hover {
2018-11-18 16:07:45 +00:00
color: $body-heading-color;
background-color: darken($body-background-color, 2%);
2017-03-27 01:09:19 +00:00
}
2017-03-24 13:47:37 +00:00
}