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

Support pseudo-elements #271

Open
siddharth-kaushik opened this issue Jun 13, 2024 · 3 comments
Open

Support pseudo-elements #271

siddharth-kaushik opened this issue Jun 13, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@siddharth-kaushik
Copy link

Safari v17.5
Using named view-timeline on parent (larger than scroll-port) to animate one of the child with animation range.

Sometime seeing below errors (one or the other) on load in Safari. Sometimes loads just fine and works fine on Firefox 🤷‍♂️

👇 A
Screenshot 2024-06-13 at 12 45 32 PM

👇 B
Screenshot 2024-06-13 at 12 46 12 PM

@bramus
Copy link
Collaborator

bramus commented Jun 13, 2024

As for B: are you animating a pseudo-element (::before or ::after) by any chance?

@siddharth-kaushik
Copy link
Author

siddharth-kaushik commented Jun 16, 2024

Yes, one of the element is a pseudo element.

Edit: The view-timeline is used by a regular element but the animation itself updates the css variables that is used by pseudo element after

Link:
Screenshot 2024-06-15 at 6 08 38 PM

@bramus
Copy link
Collaborator

bramus commented Jun 17, 2024

OK, that would be the underlying problem that needs to get fixed. Core of the issue is that in JavaScript there is no proper API to get pseudo-elements. The Web Animations API has a workaround for this built-in, but that’s currently not used here.

@bramus bramus changed the title Throws random errors on load in Safari Support pseudo-elements Oct 17, 2024
@bramus bramus added the enhancement New feature or request label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants