Remove Visual Side-Effect of <a> Tags

Retain the original look of the headers
This commit is contained in:
ShaopengLin 2024-09-27 22:03:39 -04:00
parent 293ce340f4
commit 7efda91489
2 changed files with 14 additions and 1 deletions

View File

@ -108,6 +108,19 @@
.kiwix-toc-item-a:before { content: counters(item, ".") " "; counter-increment: item; margin-right: 10px; padding-left: 10px; }
.kiwix-toc-a {
all: inherit;
pointer-events: none;
}
.kiwix-toc-a:hover {
all: inherit;
}
.kiwix-toc-a:visited {
all: inherit;
}
#kiwix-toc {
all: initial;
display: block;

View File

@ -20,7 +20,7 @@ function recurseChild(elem, recurseData)
recurseData.count += 1;
/* Wrap header content with something we can reference. */
elem.innerHTML = '<a href="#' + anchor + '" id="' + anchor + '">' + headerText + '</a>';
elem.innerHTML = '<a href="#' + anchor + '" id="' + anchor + '" class="kiwix-toc-a">' + headerText + '</a>';
/* Start or end a list or item based on current and previous level */
if (level > prevLevel)