Skip to content

Commit

Permalink
css/js fixes for text in <li> and <td> now including <p>
Browse files Browse the repository at this point in the history
  • Loading branch information
goatlady committed Feb 19, 2025
1 parent 25614a0 commit b139b2e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 6 additions & 0 deletions docs/_static/survey/css/main-2024.css
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ nav {
font-size: var(--font-size-1);
line-height: var(--font-lineheight-2);
}
p {
display: inline;
}
}

/* default color */
Expand Down Expand Up @@ -525,6 +528,9 @@ main {
padding: var(--size-2);
}
}
p {
display: inline;
}
&&::after { /* add box-shadow */
display: block;
content:'';
Expand Down
10 changes: 4 additions & 6 deletions docs/_static/survey/js/survey.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
document.addEventListener("DOMContentLoaded", function() {
var submenuLinks = document.querySelectorAll(".simple li > ul > li > a");
// Select all submenu links, whether inside <p> or directly inside <li>
var submenuLinks = document.querySelectorAll(".simple > li > ul > li a");

submenuLinks.forEach(function(link) {
link.addEventListener("click", function(event) {
var parentLi = this.parentElement;
var parentLi = this.closest("li"); // Find the closest <li> instead of assuming direct parent
var siblings = parentLi.parentElement.children;

// Hide other submenus
Expand All @@ -17,7 +18,4 @@ document.addEventListener("DOMContentLoaded", function() {
parentLi.classList.toggle("active");
});
});
});



});

0 comments on commit b139b2e

Please sign in to comment.