Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Улучшение для рецепта про тултип https://doka.guide/recipes/tooltip/ #5690

Open
YarD17 opened this issue Feb 14, 2025 · 1 comment

Comments

@YarD17
Copy link

YarD17 commented Feb 14, 2025

Улучшение для рецепта про тултип https://doka.guide/recipes/tooltip/
Пример использования связки Popover API, CSS Anchor Positioning и interesttarget в обновлённом примере из рецепта Withinteresttarget.txt

Адаптивный тултип на основе Popover API, CSS Anchor Positioning и interesttarget
Новый атрибут interesttarget позволяет показывать, при наведении на кнопку, тултип из примера adaptive-popover-and-css-anchor-positioning без использования JS. Чтобы это реализовать прописывается атрибут interesttarget с id тултипа в кнопку.
🚧 Данное поведение пока работает только в Chrome Canary
Кнопке добавляется новый атрибут interesttarget с указанием id-шника тултипа который позволяет показывать тултип при наведении без использования JS
<button class="button tooltip-anchor" id="tooltip-anchor" interesttarget="tooltip" aria-describedby="tooltip" > ❤️ </button>

@akhmadullin
Copy link
Contributor

Как мне кажется, надо дождаться появления interesttarget в стабильных версиях браузера(ов), потом уже можно будет поправить рецепт :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants