use hidden attr instead of display:none

This commit is contained in:
Rhiannon Morris 2020-08-04 21:10:50 +02:00
parent 07d71de471
commit 7de35a098f
2 changed files with 1 additions and 9 deletions

View file

@ -23,11 +23,7 @@ function updateItems() {
let req = tags.get(item).some(x => reqTags.has(x)); let req = tags.get(item).some(x => reqTags.has(x));
let exc = tags.get(item).some(x => excTags.has(x)); let exc = tags.get(item).some(x => excTags.has(x));
if ((req || !anyReq) && !exc) { item.hidden = exc || (anyReq && !req);
item.classList.remove('hidden');
} else {
item.classList.add('hidden');
}
} }
} }

View file

@ -107,10 +107,6 @@ body {
background: hsl(340, 45%, 65%); background: hsl(340, 45%, 65%);
} }
.item.hidden {
display: none;
}
.item:focus-within { .item:focus-within {
box-shadow: var(--focus-box); box-shadow: var(--focus-box);
} }