Merge pull request #668 from NoRedInk/fix-extra-whitespace-on-tooltip-triggers

Fix extra whitespace on tooltip triggers
This commit is contained in:
Brian Hicks 2021-01-06 13:10:52 -06:00 committed by GitHub
commit f952f60ac6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -531,7 +531,17 @@ viewTooltip_ { trigger, id } tooltip =
tooltip.containerStyles
containerEvents
[ Html.div
[]
[ Attributes.css
[ -- using display flex not so that the wrapping div fits its
-- contents exactly. otherwise, it will be at least of the
-- size of a line of text, adding some extra vertical space
-- when the trigger is short (making it look like vertical
-- alignment is broken). if you ever need to change this back
-- to `block` or `inline-block`, consider adjusting the
-- `font-size` to zero to achieve a similar effect.
Css.displayFlex
]
]
[ trigger
([ if tooltip.isOpen then
case tooltip.purpose of