I’m working on a website using a modified stack theme. I’m having and issue with a tooltip shortcode I made as where it gets cut off when placed in a table.
This is what it looks like normally compared to what it looks like in a table.
When in a table it gets cut off at the edges and also makes a horizontal scroll bar, this does not happen when using it outside of tables.
The table itself is made using Hugo’s markdown and I’m unsure of how to resolve this issue, the markdown for the table itself looks something like this:
|Name|Platforms|Plug-in Formats (Hosts)|License|R|Notes|
|---|---|---|---|:---:|---|
|[Bitwig](https://www.bitwig.com/) |Linux, Windows, MacOS|CLAP, VST2, VST3|[**Proprietary**][6] **$**|✓|{{<tooltip text="I like the horizontal FX rack, probably my fav DAW, but it's proprietary and it also doesn't support LV2 which kind of sucks.">}}Note{{</tooltip>}}|
If it is of any help the code for the tooltip looks like this:
html
<span class="tooltip">
{{- .Inner | markdownify -}}
<span class="tooltiptext">
{{- .Get "text" | markdownify -}}
</span>
</span>
{{- /* This comment removes trailing newlines. */ -}}
scss
.tooltip {
position: relative;
display: inline-block;
cursor: pointer;
text-decoration: underline dotted;
color: var(--accent-color);
&:hover {
color: var(--accent-color-darker);
}
}
.tooltiptext {
visibility: hidden;
width:max-content;
max-width: 460px;
background: var(--card-background-hover);
color: var(--card-text-color-main);
border-radius: var(--card-border-radius);
padding: 15px;
z-index: 1;
font-size: 1.4rem;
text-align: left;
line-height: 1.4;
font-family: var(--base-font-family);
position: absolute;
bottom: 100%;
left: 50%;
transform: translate(-50%, -10px);
opacity: 0;
transition: all 0.35s ease;
pointer-events: none;
box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.08), 0px 4px 12px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.08), 0px 0px 1px rgba(0, 0, 0, 0.08);
&:after {
content: '';
position: absolute;
top: 100%;
left: 50%;
margin-left: -8px;
border-width: 8px;
border-style: solid;
border-color: var(--card-background-hover) transparent transparent transparent;
}
}