Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-anchor-position] An ability to have a transition for position-visibility's hidden effect #10411

Closed
kizu opened this issue Jun 9, 2024 · 1 comment

Comments

@kizu
Copy link
Member

kizu commented Jun 9, 2024

Right now the effect of position-visibility (https://drafts.csswg.org/css-anchor-position-1/#position-visibility) is immediate, making it sometimes a bit jarring when the anchored element hides/appears.

I can see authors wanting to design this transition: through opacity, translate or any other way they want to design the regular enter/leave transition for their anchored elements.

For popovers we can design the transition via a combination of :popover-open and @starting-style (https://nerdy.dev/using-starting-style-and-transition-behavior-for-enter-and-exit-stage-effects), but for cases like with position-visibility we don't have any hooks that we currently could use for this.

I am not yet sure what the solution could be, but I am certain that we need one. Open questions:

  • Should we somehow reuse the @starting-style?
  • Will we need the @ending-style or something like that in absence of :popover-open alternative?
  • Or could we say that when the element hides via position-visibility it uses the @starting-style if it is defined as the styles it will transition to?
  • If we'd add the above, should we have a new keyword in the transition-property to cover the visibility part of the transition itself, like position-visibility? Or we could reuse visibility there?
@kizu
Copy link
Member Author

kizu commented Jun 10, 2024

Closing as a duplicate of #10182

@kizu kizu closed this as not planned Won't fix, can't repro, duplicate, stale Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant