Hi Adam,
The problem with the wrapping is that the element above where your tooltip is placed, is too small. The tooltip is rendered with display: inline-block which means it automatically has the width of the parent container:
If you give this parent element more ‘space’, the tooltip will be larger as well.
You can also turn off the word-break functionality. Create a custom tooltip class and set word-break to normal:
.widget-tooltip--custom .widget-tooltip-content {
word-break: normal;
}
Note that the widget automatically generates the tooltip and can decide to put the tooltip to the right if there is more space there if you 'force' the tooltip to be larger.
Hope this helps!
If you use a tooltip widget, which uses a class as a pointer, you could put a dynamic class on the field.
if $object/value != empty
then ‘classfortooltip’
else ‘’