Skip to content
Snippets Groups Projects
Commit 594731b9 authored by Olivia206's avatar Olivia206
Browse files

added class for search with toc

parent addce360
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,9 @@ class Search {
}
listen() {
if (document.body.querySelector(".toc-cta")) {
this.button.classList.add('in-page-with-toc');
}
this.button.addEventListener('click', () => {
this.toggle(true);
this.removedItems = this.element.querySelector('.pagefind-ui__suppressed', '.pagefind-ui__search-clear');
......
......@@ -14,9 +14,10 @@
line-height: inherit
margin-left: px2rem(8)
@include media-breakpoint-down(md)
border-bottom: 1px solid #adb5bd
padding: $spacing1 0
width: 100%
&:not(.pagefind-fixed)
border-bottom: 1px solid #adb5bd
padding: $spacing1 0
width: 100%
.search__close
@include icon-block(close, after)
position: fixed
......@@ -29,7 +30,7 @@
margin-left: $spacing0
width: px2rem(15)
@include media-breakpoint-down(md)
right: 0
right: $spacing1
top: half($spacing0)
#search
background: $color-background
......@@ -155,4 +156,9 @@
min-width: calc(#{$spacing3} * 3)
&::after
position: absolute
right: $spacing0
\ No newline at end of file
right: $spacing0
@include media-breakpoint-down(md)
left: 0
width: 100vw
&.in-page-with-toc
bottom: px2rem(44)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment