« get me outta code hell

client, css: style hovered/active tooltip links wavy - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-11-26 18:16:34 -0400
committer(quasar) nebula <qznebula@protonmail.com>2023-11-26 18:16:34 -0400
commit15bc6d580ec2b3a754ff3dc17e9eb24bc90e052a (patch)
tree7769457a1f784a3746a22cc49720d979bc1dc866
parentf03ea65a10124d8962609f03d4df84be1531db17 (diff)
client, css: style hovered/active tooltip links wavy
-rw-r--r--src/static/client3.js4
-rw-r--r--src/static/site6.css5
2 files changed, 9 insertions, 0 deletions
diff --git a/src/static/client3.js b/src/static/client3.js
index 866b9ba2..390d020e 100644
--- a/src/static/client3.js
+++ b/src/static/client3.js
@@ -754,6 +754,8 @@ function hideCurrentlyShownTooltip() {
   // Never hide the tooltip if it's focused.
   if (currentlyShownTooltipHasFocus()) return false;
 
+  state.currentlyActiveHoverable.classList.remove('has-visible-tooltip');
+
   state.currentlyShownTooltip = null;
   state.currentlyActiveHoverable = null;
 
@@ -774,6 +776,8 @@ function showTooltipFromHoverable(hoverable) {
 
   if (!hideCurrentlyShownTooltip()) return false;
 
+  hoverable.classList.add('has-visible-tooltip');
+
   state.currentlyShownTooltip = tooltip;
   state.currentlyActiveHoverable = hoverable;
 
diff --git a/src/static/site6.css b/src/static/site6.css
index 884cfca6..830e32f2 100644
--- a/src/static/site6.css
+++ b/src/static/site6.css
@@ -482,6 +482,11 @@ a:not([href]):hover {
   text-decoration-style: dotted;
 }
 
+.contribution.has-tooltip > a:hover,
+.contribution.has-tooltip > a.has-visible-tooltip {
+  text-decoration-style: wavy !important;
+}
+
 .icons {
   font-style: normal;
   white-space: nowrap;