Repository navigation
Tooltips - Toggleable on mobile, hover on desktop #2823
Replies: 1 comment
|
You can already get this without a breakpoint. I went through the tooltip Blade stub and the built JS to check, and <flux:tooltip toggleable hover content="Some helpful info">
<flux:button icon="information-circle" variant="ghost" size="sm" />
</flux:tooltip>Here's why. The bit that makes it work per device is Flux's shared hover helper. It keeps a global record of the last interaction type, set from A few caveats from reading the source rather than the docs. I'd still like |
Uh oh!
There was an error while loading. Please reload this page.
On mobile tooltips don't work if you don't make them toggleable. But toggleable tooltips suck on desktop when you have a dozen of them on the page and want to quickly hover over them to find the info you are looking for.
The attribute is a PHP variable that switches what type of element to load. AFAIK there is no great PHP way to determine mobile vs not. CSS breakpoints are great and easy way to do it. It would be awesome if there was another option like "toggleable:mobile".
All reactions