From 7efda914895a7f1bd4d2ed12bdfdf2f3cff8495c Mon Sep 17 00:00:00 2001 From: ShaopengLin Date: Fri, 27 Sep 2024 22:03:39 -0400 Subject: [PATCH] Remove Visual Side-Effect of Tags Retain the original look of the headers --- resources/css/toc.css | 13 +++++++++++++ resources/js/toc.js | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/resources/css/toc.css b/resources/css/toc.css index f02a8a8..71900f8 100644 --- a/resources/css/toc.css +++ b/resources/css/toc.css @@ -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; diff --git a/resources/js/toc.js b/resources/js/toc.js index 118c472..4f899ec 100644 --- a/resources/js/toc.js +++ b/resources/js/toc.js @@ -20,7 +20,7 @@ function recurseChild(elem, recurseData) recurseData.count += 1; /* Wrap header content with something we can reference. */ - elem.innerHTML = '' + headerText + ''; + elem.innerHTML = '' + headerText + ''; /* Start or end a list or item based on current and previous level */ if (level > prevLevel)