mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
126 lines
2.3 KiB
CSS
126 lines
2.3 KiB
CSS
body.site-search-visible {
|
|
overflow: hidden;
|
|
}
|
|
|
|
.sidebar .search-box {
|
|
margin: 1.25rem 26px;
|
|
}
|
|
|
|
.sidebar .search-box kbd {
|
|
margin-top: 2px;
|
|
}
|
|
|
|
/* Site search */
|
|
.site-search {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.site-search[hidden] {
|
|
display: none;
|
|
}
|
|
|
|
.site-search__overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgb(var(--sl-overlay-background-color) / var(--sl-overlay-opacity));
|
|
z-index: -1;
|
|
}
|
|
|
|
.site-search__panel {
|
|
display: flex;
|
|
flex-direction: column;
|
|
max-width: 460px;
|
|
max-height: calc(100vh - 20rem);
|
|
background-color: rgb(var(--sl-color-neutral-0));
|
|
border-radius: var(--sl-border-radius-large);
|
|
box-shadow: var(--sl-shadow-x-large);
|
|
margin: 10rem auto;
|
|
}
|
|
|
|
@media screen and (max-width: 1000px) {
|
|
.site-search__panel {
|
|
max-width: 100%;
|
|
max-height: 92vh;
|
|
margin: 4vh var(--sl-spacing-medium);
|
|
}
|
|
}
|
|
|
|
.site-search__input::part(base) {
|
|
border: none;
|
|
}
|
|
|
|
.site-search__input:focus-within::part(base) {
|
|
outline: none;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.site-search__body {
|
|
flex: 1 1 auto;
|
|
overflow: auto;
|
|
}
|
|
|
|
.site-search--has-results .site-search__body {
|
|
border-top: solid 1px rgb(var(--sl-color-neutral-200));
|
|
}
|
|
|
|
.site-search__results {
|
|
display: none;
|
|
line-height: var(--sl-line-height-dense);
|
|
list-style: none;
|
|
padding: var(--sl-spacing-x-small) 0;
|
|
margin: 0;
|
|
}
|
|
|
|
.site-search--has-results .site-search__results {
|
|
display: block;
|
|
}
|
|
|
|
.site-search__results a {
|
|
display: block;
|
|
text-decoration: none;
|
|
padding: var(--sl-spacing-x-small) var(--sl-spacing-large);
|
|
}
|
|
|
|
.site-search__results li a:hover,
|
|
.site-search__results li a:hover small,
|
|
.site-search__results li a[aria-selected],
|
|
.site-search__results li a[aria-selected] small {
|
|
outline: none;
|
|
color: rgb(var(--sl-color-neutral-0));
|
|
background-color: rgb(var(--sl-color-primary-600));
|
|
}
|
|
|
|
.site-search__results h3 {
|
|
font-weight: var(--sl-font-weight-semibold);
|
|
margin: 0;
|
|
}
|
|
|
|
.site-search__results li {
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
.site-search__results small {
|
|
display: block;
|
|
color: rgb(var(--sl-color-neutral-600));
|
|
}
|
|
|
|
.site-search__empty {
|
|
display: none;
|
|
border-top: solid 1px rgb(var(--sl-color-neutral-200));
|
|
text-align: center;
|
|
padding: var(--sl-spacing-x-large);
|
|
}
|
|
|
|
.site-search--no-results .site-search__empty {
|
|
display: block;
|
|
}
|