diff --git a/script/gallery.js b/script/gallery.js index d0c45ae..98d82f9 100644 --- a/script/gallery.js +++ b/script/gallery.js @@ -23,11 +23,7 @@ function updateItems() { let req = tags.get(item).some(x => reqTags.has(x)); let exc = tags.get(item).some(x => excTags.has(x)); - if ((req || !anyReq) && !exc) { - item.classList.remove('hidden'); - } else { - item.classList.add('hidden'); - } + item.hidden = exc || (anyReq && !req); } } diff --git a/style/shiny/gallery.css b/style/shiny/gallery.css index 00ba342..4bb8dd8 100644 --- a/style/shiny/gallery.css +++ b/style/shiny/gallery.css @@ -107,10 +107,6 @@ body { background: hsl(340, 45%, 65%); } -.item.hidden { - display: none; -} - .item:focus-within { box-shadow: var(--focus-box); }