You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding animations to elements making use of anchor positioning, it would be useful to be able to change the transform-origin and translate depending on the position of the anchor. This would be possible if a custom @position-try could include the transform-origin property.
This Codepen demonstrates the sort of effects developers may want to achieve that are dependent on transform-origin being set in the appropriate place. Here's an example of how broken the animation looks when flip-block repositions the popover.
An example of using tranlate: the following transition works well when a dropdown is shown below the button that opens it, but would look strange if the dropdown is above the button.
I wanted it to look like the anchored popover was literally dropping down from the button, which only makes sense if it is below the button.
The text was updated successfully, but these errors were encountered:
o-t-w
changed the title
[css-anchor-position] custom @position-try should allow
[css-anchor-position] custom @position-try should allow transform-origin
Feb 6, 2025
o-t-w
changed the title
[css-anchor-position] custom @position-try should allow transform-origin
[css-anchor-position] custom @position-try should allow transform-origin and translate
Feb 7, 2025
Imagine a dropdown, that animates in a downwards fashion, when anchored beneath its target.
And therefore, it should animate upwards if being anchored above its target.
When adding animations to elements making use of anchor positioning, it would be useful to be able to change the
transform-origin
andtranslate
depending on the position of the anchor. This would be possible if a custom@position-try
could include thetransform-origin
property.This Codepen demonstrates the sort of effects developers may want to achieve that are dependent on
transform-origin
being set in the appropriate place. Here's an example of how broken the animation looks whenflip-block
repositions the popover.An example of using
tranlate
: the following transition works well when a dropdown is shown below the button that opens it, but would look strange if the dropdown is above the button.I wanted it to look like the anchored popover was literally dropping down from the button, which only makes sense if it is below the button.
The text was updated successfully, but these errors were encountered: