An open API service indexing awesome lists of open source software.

https://github.com/knowler/tooltip-label-element


https://github.com/knowler/tooltip-label-element

Last synced: 12 days ago
JSON representation

Awesome Lists containing this project

README

          

# `` element

_Another experimental work in progress…_

A custom element for when you want to progressively enhance a button or a links text as a tooltip.

- Leverages `interestfor` and `popover=hint` for the experience with the least JS.
- Eventually, you could just apply `popover=hint` and `interestfor` yourself, this just does it when it’s available.
- Instead of using a polyfill, this applies the functionality on top of `popover=auto`
- When the Popover API isn’t supported
- Since the tooltip is set within the button/link, you can use absolute positioning to relatively position the tooltip to the parent when anchor positioning is not available.
- Will it scale? _Scale is not a virtue._