Design Engineering Tip
Your tooltip doesn’t always end up where you placed it?
When it reaches the viewport edge, the browser automatically chooses a fallback position. Anchored Container Queries let your CSS detect that chosen position, so your tooltip can animate from the correct direction.
@ container anchored(fallback: flip-block) {
.tooltip {
animation-name: slide-from-top;
}
}