[csswg-drafts] [css-anchor-position-1] Ability to opt-out of transforms affecting anchor positioning (#13782)

devongovett has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-anchor-position-1] Ability to opt-out of transforms affecting anchor positioning ==
Continuing from https://github.com/w3c/csswg-drafts/issues/8584#issuecomment-4211367860

In #8584 it was resolved to make anchor positioning take transforms into account. I have a use-case where this is not desirable. I have an a button that has a shake animation (a rotation/translate transform) when an error occurs, and this behavior is causing an attached tooltip to also shake. Ideally the tooltip would stay fixed while the button animation occurred.

Here's an example: https://codepen.io/devongovett/pen/QwKZbEx

In Chrome, which has implemented the update, the tooltip shakes in addition to the button. In the current Firefox, the tooltip does not shake (desired).

While I think taking transforms into account is a good default, I think there should be a way to opt-out of this behavior for cases like this. As @kizu mentioned (https://github.com/w3c/csswg-drafts/issues/8584#issuecomment-4212657311), you could add a wrapper element to the button anchor anchor to that instead, but sometimes it's not possible to add an extra DOM element. I don't have a solid proposal, but perhaps a new property to control to `anchor-behavior` or something like that.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13782 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 9 April 2026 16:59:07 UTC