diff --git a/web/show.css b/web/show.css index 780e9d288e30d759a91a55d5416a2306bc894c90..05f0dfbb42b1413743194572c6439ef84dca4edd 100644 --- a/web/show.css +++ b/web/show.css @@ -92,7 +92,7 @@ styleguide subcategory { transition-duration: .3s; transition-timing-function: cubic-bezier(0, 1, 0.5, 1); overflow-y: hidden; - max-height: 10000px; + max-height: 6000px; } styleguide b { diff --git a/web/show.js b/web/show.js index 36490fcfbdc36b21cdd0329ee4ca990c6148f462..b6048f0339976caf88c181202d0982de82fa6586 100644 --- a/web/show.js +++ b/web/show.js @@ -70,8 +70,13 @@ function renderStyleguide(styleguide) { }); nav.addEventListener("click", function() { - this.parentNode.classList.toggle("closed"); - this.parentNode.classList.toggle("open"); + if (this.parentNode.classList.contains("closed")) { + this.parentNode.classList.remove("closed"); + this.parentNode.classList.add("open"); + } else { + this.parentNode.classList.add("closed"); + this.parentNode.classList.remove("open"); + } }); parts[i].classList.add("closed");