diff --git a/src/Code/Syntax/SyntaxSegment.elm b/src/Code/Syntax/SyntaxSegment.elm index d987ef00..af07718f 100644 --- a/src/Code/Syntax/SyntaxSegment.elm +++ b/src/Code/Syntax/SyntaxSegment.elm @@ -306,7 +306,7 @@ view linked ((SyntaxSegment sType sText) as segment) = in Tooltip.view (span - [ class className ] + [ class "syntax-help", class className ] [ content ] ) tooltip diff --git a/src/css/code/syntax.css b/src/css/code/syntax.css index 1d7f7a1f..c8359a48 100644 --- a/src/css/code/syntax.css +++ b/src/css/code/syntax.css @@ -37,6 +37,16 @@ code a:active .tooltip-trigger.tooltip_show .tooltip { display: none; } +.tooltip-trigger:has(.syntax-help) .tooltip { + margin-left: -0.5rem; +} + +.tooltip-trigger:has(.syntax-help) .tooltip-bubble { + max-width: 22rem; + min-width: 22rem; + white-space: pre-wrap; +} + .rich .fqn .sep { color: var(--color-syntax-subtle); }