ghosh / microtip

💬 Minimal, accessible, ultra lightweight css tooltip library. Just 1kb.
https://microtip.vercel.app/
MIT License
1.38k stars 74 forks source link

Multi line tool tip #57

Open hornwijaya opened 3 years ago

hornwijaya commented 3 years ago

Microtip is MARVELOUS, easy to use and beautiful. but I have been trying to use Multi line texts in the aria-label, seems like not possible. Do you know a trick to make it happen? Thanks.

KrishnaPG commented 3 years ago

Looking for similar option. It would be great if any HTML content can be shown in the tooltip, such as line-breaks, hr, and links (a tags).

hornwijaya commented 3 years ago

I have made some adaptation.

in microtip.min.css white-space:nowrap --> pre-line

and then we use php \n as line break e.g.

convert every space to   so that it does not break on itself.

Hope this helps.

sgsavu commented 1 year ago

@hornwijaya that didn't work for me but rather setting it to "pre". Then I have my text in quote marks and use enter for line breaks. image image image