Skip to content

Commit

Permalink
Improve tooltip sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
hojberg committed Jul 25, 2024
1 parent f2feefe commit 646361e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Code/Syntax/SyntaxSegment.elm
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ view linked ((SyntaxSegment sType sText) as segment) =
in
Tooltip.view
(span
[ class className ]
[ class "syntax-help", class className ]
[ content ]
)
tooltip
Expand Down
10 changes: 10 additions & 0 deletions src/css/code/syntax.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 646361e

Please sign in to comment.