From 6cbdcc8b041fc8e9a0300d9616ff5dafe0710c07 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 18 Jun 2024 09:53:04 -0300 Subject: content: generateTooltip: blank if no content --- src/content/dependencies/generateTooltip.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/content/dependencies/generateTooltip.js b/src/content/dependencies/generateTooltip.js index 81f74aec..8314d33c 100644 --- a/src/content/dependencies/generateTooltip.js +++ b/src/content/dependencies/generateTooltip.js @@ -21,10 +21,13 @@ export default { generate: (slots, {html}) => html.tag('span', {class: 'tooltip'}, {[html.noEdgeWhitespace]: true}, + {[html.onlyIfContent]: true}, slots.attributes, html.tag('span', {class: 'tooltip-content'}, {[html.noEdgeWhitespace]: true}, + {[html.onlyIfContent]: true}, slots.contentAttributes, + slots.content)), }; -- cgit 1.3.0-6-gf8a5