hugo-theme-hyde-hyde/static-src/scss/hyde-hyde/_search.scss

131 lines
2.3 KiB
SCSS
Raw Normal View History

2018-09-20 01:43:24 +00:00
// search box styles
// generated and adapted from https://shipow.github.io/searchbox
.searchbox {
margin-top: 1rem;
margin-bottom: 1rem;
text-align: center;
form {
display: inline-block;
position: relative;
width: 12rem;
height: 1.65rem;
white-space: nowrap;
font-size: $searchbox-font-size;
}
}
.searchbox__wrapper {
width: 100%;
height: 100%;
}
.searchbox__input {
display: inline-block;
transition: box-shadow 0.4s ease, background 0.4s ease;
border: 0;
border-radius: 17px;
box-shadow: inset 0 0 0 1px #e1e8ed;
background: #f5f8fa;
padding: 0;
padding-right: 52px;
padding-left: 16px;
width: 100%;
height: 100%;
vertical-align: middle;
white-space: normal;
font-size: inherit;
appearance: none;
&:hover {
box-shadow: inset 0 0 0 1px #c1d0da;
}
&:focus {
outline: 0;
}
&:active {
outline: 0;
}
&:valid ~ .searchbox__reset {
display: block;
animation-name: sbx-reset-in;
animation-duration: 0.15s;
}
}
.searchbox__input::-webkit-search-decoration {
display: none;
}
.searchbox__input::-webkit-search-cancel-button {
display: none;
}
.searchbox__input::-webkit-search-results-button {
display: none;
}
.searchbox__input::-webkit-search-results-decoration {
display: none;
}
.searchbox__input::placeholder {
color: #9aaeb5;
}
.searchbox__submit {
position: absolute;
top: 0;
right: 0;
left: inherit;
margin: 0;
border: 0;
border-radius: 0 16px 16px 0;
background-color: rgba(62, 130, 247, 0);
padding: 0;
width: 33px;
height: 100%;
vertical-align: middle;
text-align: center;
font-size: inherit;
user-select: none;
&:hover {
cursor: pointer;
}
&:active {
cursor: pointer;
}
&:focus {
outline: 0;
}
svg {
width: 13px;
height: 13px;
vertical-align: middle;
fill: #657580;
}
}
.searchbox__submit::before {
display: inline-block;
margin-right: -4px;
height: 100%;
vertical-align: middle;
content: "";
}
.searchbox__reset {
display: none;
position: absolute;
top: 7px;
right: 33px;
margin: 0;
border: 0;
background: none;
cursor: pointer;
padding: 0;
font-size: inherit;
user-select: none;
fill: rgba(0, 0, 0, 0.5);
&:focus {
outline: 0;
}
svg {
display: block;
margin: 4px;
width: 11px;
height: 11px;
}
}