hidden-search modification

a little of change in the css style, and I have fixed a bug, when the text field was not visible you could still type, now it is not.
pull/208/head
Mi1Col 9 months ago
parent 9409685c9a
commit 2b700d6144

@ -4,5 +4,7 @@ const input = document.querySelector('.input')
btn.addEventListener('click', () => { btn.addEventListener('click', () => {
search.classList.toggle('active') search.classList.toggle('active')
input.focus() if (search.classList != 'search' && 'active') {
input.focus(search)
}
}) })

@ -27,12 +27,13 @@ body {
padding: 15px; padding: 15px;
height: 50px; height: 50px;
width: 50px; width: 50px;
transition: width 0.3s ease; transition: width 0.5s ease;
} }
.btn { .btn {
background-color: #fff; background-color: #fff;
border: 0; border: 0;
border-radius: 0px 10px 10px 0px;
cursor: pointer; cursor: pointer;
font-size: 24px; font-size: 24px;
position: absolute; position: absolute;
@ -40,7 +41,7 @@ body {
left: 0; left: 0;
height: 50px; height: 50px;
width: 50px; width: 50px;
transition: transform 0.3s ease; transition: transform 0.5s ease;
} }
.btn:focus, .btn:focus,

Loading…
Cancel
Save