mirror of
https://github.com/primer/css.git
synced 2024-11-27 17:52:45 +03:00
697 B
697 B
layout | title |
---|---|
page | Tooltips |
Add tooltips built entirely in CSS to nearly any element. Just add a few classes and an aria-label
attribute.
In addition, you'll want to specify a direction:
.tooltipped-n
.tooltipped-ne
.tooltipped-e
.tooltipped-se
.tooltipped-s
.tooltipped-sw
.tooltipped-w
.tooltipped-nw
Remember, aria-label
and tooltip classes must go directly on <button>
and <a>
elements. Tooltip classes also conflict with Octicon clases, and as such, must go on a parent element instead of the icon.
{% example html %} Text with a tooltip {% endexample %}