« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/content/dependencies/generateTextWithTooltip.js8
-rw-r--r--src/content/dependencies/generateTooltip.js1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/content/dependencies/generateTextWithTooltip.js b/src/content/dependencies/generateTextWithTooltip.js
index 87626367..49ce1f61 100644
--- a/src/content/dependencies/generateTextWithTooltip.js
+++ b/src/content/dependencies/generateTextWithTooltip.js
@@ -46,11 +46,19 @@ export default {
     const textPart =
       (hasTooltip && slots.customInteractionCue
         ? html.tag('span', {class: 'hoverable'},
+            {[html.onlyIfContent]: true},
+
             slots.text)
+
      : hasTooltip
         ? html.tag('span', {class: 'hoverable'},
+            {[html.onlyIfContent]: true},
+
             html.tag('span', {class: 'text-with-tooltip-interaction-cue'},
+              {[html.onlyIfContent]: true},
+
               slots.text))
+
         : slots.text);
 
     const content =
diff --git a/src/content/dependencies/generateTooltip.js b/src/content/dependencies/generateTooltip.js
index 8314d33c..b09ee230 100644
--- a/src/content/dependencies/generateTooltip.js
+++ b/src/content/dependencies/generateTooltip.js
@@ -22,6 +22,7 @@ export default {
     html.tag('span', {class: 'tooltip'},
       {[html.noEdgeWhitespace]: true},
       {[html.onlyIfContent]: true},
+      {[html.onlyIfSiblings]: true},
       slots.attributes,
 
       html.tag('span', {class: 'tooltip-content'},