-
Notifications
You must be signed in to change notification settings - Fork 50
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
JavaScript access to temporary pseudo elements #156
Comments
@mattgperry does Javascript have access to pseudo elements? Afaik I've never seen an API or way of doing that. Which does raise a question I've had. Why pseudo elements? |
Via WAAPI, some limited access, but the assumption here is it’s be provided explicit access via prev and next rather than suffer current limitations |
WAAPI already has full access to animating pseudo-elements, but yes, there's no way to change the 'inline style' of a pseudo-element. Is it fair to say these features would cover your use-case?:
|
Yeah, that would be perfect! |
Does that mean an API which lets you query the set of pseudo elements that were generated? Something like
Would it be a good idea to add this to CSSPseudoElement. Sounds like this is a useful addition to animate any pseudo element. |
Yeah, or if that's hard to add generally, we could have an API that returns the valid
Looks like there's already a note there suggesting it's a likely addition! |
Hey, great job with the latest revision of this API!
One thing I'd love to see is JavaScript access to temporary pseudo elements so we can animate them beyond the capabilities of CSS. I think this is important: JS libraries have usually unlocked features (independent transforms, spring animations, layout animations etc), often decades before native browser APIs and it'd be great to get that flexibility here.
The animations could be performed via WAAPI or
requestAnimationFrame
and would resolve a promise to mark the animation as complete.prev
andnext
here being keyed objects offering the created DOM elements used in the animation via theirpage-transition-tag
IDs.The text was updated successfully, but these errors were encountered: