:interest-source CSS Pseudo Class
The :interest-source pseudo-class matches an element with the interestfor attribute while the user is showing interest in it.
Description
The :interest-source pseudo-class matches an interest invoker, the element with the interestfor attribute, while interest is being shown in its target. It can be used to highlight the button or link whose tooltip or hover card is currently open.
Interest invokers are a new HTML feature. Adding an interestfor attribute to a button or link, with the id of another element as its value, makes the browser "show interest" when the user hovers over, focuses or long-presses the invoker. After a short delay (controlled by the interest-delay properties) the target, usually a popover, is shown, and it is hidden again when interest is lost. This allows tooltips and hover cards without JavaScript.
button:interest-source {
background-color: hotpink;
color: purple;
}
Its counterpart :interest-target matches the target element at the same time. The pseudo-class is experimental and currently only supported in Chromium-based browsers.
Syntax
:interest-source {
/* ... */
}Example
Browser Support
The following information will show you the current browser support for the CSS :interest-source pseudo class. Hover over a browser icon to see the version that first introduced support for this CSS pseudo class.
Desktop





Tablets & Mobile





