Skip to content
Snippets Groups Projects
Commit 9b0f7418 authored by Olivia206's avatar Olivia206
Browse files

fixed icon

parent 77b26b50
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ class Search {
this.button = button;
this.element = document.querySelector('.search__modal');
this.closeButton = this.element.querySelector('.search__close');
// this.searchContent = this.element.querySelector('.pagefind-ui__drawer');
if (!this.element) {
return;
......@@ -25,6 +26,8 @@ class Search {
});
this.closeButton.addEventListener('click', () => {
this.element.querySelector('form').reset();
this.element.querySelector('input').blur();
// this.searchContent.classList.add('pagefind-ui__hidden');
this.toggle(false);
this.button.focus();
});
......@@ -35,7 +38,6 @@ class Search {
this.button.focus();
} else if (event.key === "Tab" && this.state.isOpened) {
this.innerFocus(event);
// event.preventDefault();
}
});
}
......
......@@ -49,19 +49,26 @@
content: ""
background: $color-background
height: calc(#{$spacing3} + #{$spacing1} + #{$spacing2} + #{$spacing1})
width: 100%
left: 0
position: fixed
top: 0
left: 0
width: 100%
z-index: 5
@include media-breakpoint-down(md)
height: calc(#{$spacing3} + #{half($spacing0)} + #{$spacing4})
&__form
@include icon(search, after)
&::after
align-items: center
display: flex
height: half($spacing3)
position: absolute
right: 0
top: 0
z-index: 7
@include media-breakpoint-down(md)
right: $spacing1
top: $spacing4
&__search-input
border-left: 0
border-right: 0
......
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