| 1 |
/** |
| 2 |
* The 'Hide Search Matches' button. |
| 3 |
* This only shows up when a person lands on a page after clicking a search result. |
| 4 |
* Clicking it removes the highlighting of the search term from the page. |
| 5 |
* We want it to behave like a button. |
| 6 |
*/ |
| 7 |
div#searchbox { |
| 8 |
// Leave `#searchbox` rules empty so that it doesn't show at all when it is empty |
| 9 |
p.highlight-link { |
| 10 |
margin: 1rem 0; |
| 11 |
width: fit-content; |
| 12 |
|
| 13 |
// A bit more margin on wide screens to mimic article behavior |
| 14 |
@include media-breakpoint-up($breakpoint-sidebar-secondary) { |
| 15 |
margin-left: 2rem; |
| 16 |
} |
| 17 |
|
| 18 |
// Put outer shadow on this one so that we can darken the link w/ an inner shadow |
| 19 |
@include box-shadow; |
| 20 |
|
| 21 |
// Style the button to look like a Sphinx Design button |
| 22 |
a { |
| 23 |
border-radius: 0.25rem; |
| 24 |
font-size: 1.25rem; |
| 25 |
padding: 0.75rem; |
| 26 |
background-color: var(--pst-color-primary); |
| 27 |
color: var(--pst-color-primary-text); |
| 28 |
text-decoration: none; |
| 29 |
|
| 30 |
// The box shadow is inset so that it darkens the button on hover |
| 31 |
transition: box-shadow 0.25s ease-out; |
| 32 |
|
| 33 |
&:hover { |
| 34 |
box-shadow: inset 0 0 50px 50px rgb(0 0 0 / 25%); |
| 35 |
} |
| 36 |
|
| 37 |
&::before { |
| 38 |
content: var(--pst-icon-search-minus); |
| 39 |
color: unset; |
| 40 |
font: var(--fa-font-solid); |
| 41 |
margin-right: 0.5rem; |
| 42 |
} |
| 43 |
} |
| 44 |
} |
| 45 |
} |