diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-11-26 19:53:45 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-11-26 19:57:06 -0400 |
commit | 57c06ea665cf2c2ee4536cab70b2459457d05e15 (patch) | |
tree | fe7478e2cc74fc1f80499ee9d509eabd6a26ee7b | |
parent | 511a26ddff981b866e7ccb6ecb0724c0a67d097e (diff) |
static, css: define tooltip show/hide 100% in JS
-rw-r--r-- | src/static/client3.js | 5 | ||||
-rw-r--r-- | src/static/site6.css | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/static/client3.js b/src/static/client3.js index 58687ecc..a55361ce 100644 --- a/src/static/client3.js +++ b/src/static/client3.js @@ -847,11 +847,11 @@ function hideCurrentlyShownTooltip(intendingToReplace = false) { // apparent in the interaction, and should be hidden with a transition. if (intendingToReplace) { cancelTransitioningTooltipHidden(); + cssProp(tooltip, 'display', 'none'); } else { beginTransitioningTooltipHidden(state.currentlyShownTooltip); } - tooltip.classList.remove('visible'); tooltip.inert = true; state.currentlyShownTooltip = null; @@ -879,7 +879,8 @@ function showTooltipFromHoverable(hoverable) { } hoverable.classList.add('has-visible-tooltip'); - tooltip.classList.add('visible'); + + cssProp(tooltip, 'display', 'block'); tooltip.inert = false; state.currentlyShownTooltip = tooltip; diff --git a/src/static/site6.css b/src/static/site6.css index 830e32f2..76b58f32 100644 --- a/src/static/site6.css +++ b/src/static/site6.css @@ -498,9 +498,6 @@ a:not([href]):hover { left: -34px; top: calc(1em + 1px); padding: 3px 6px 6px 6px; -} - -.icons-tooltip:not(.visible) { display: none; } |