Bug 186837 - :host::before and :host::after cannot reference a keyframe defined in an outer scope
Summary: :host::before and :host::after cannot reference a keyframe defined in an oute...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: WebKit Nightly Build
Hardware: Mac macOS 10.13
: P2 Normal
Assignee: Nobody
URL: https://faithful-string.glitch.me/
Keywords: BrowserCompat, InRadar
Depends on:
Blocks: 148695
  Show dependency treegraph
 
Reported: 2018-06-20 01:23 PDT by RPG
Modified: 2023-12-31 09:29 PST (History)
7 users (show)

See Also:


Attachments
Test (1.43 KB, text/html)
2022-07-10 20:14 PDT, Ryosuke Niwa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description RPG 2018-06-20 01:23:30 PDT
Pseudoelements (::before, ::after) generated inside a Shadow Root are not able to use CSS animation keyframes defined inside the same Shadow Root. Instead, they are able to use keyframes defined in the main document outside the Shadow Root.

Normal elements (a div, for example) inside the shadow root can use animation keyframes as expected.

This behavior is very clear in the provided URL when comparing it to Chrome or Firefox Nightly.

https://faithful-string.glitch.me/
Comment 1 Radar WebKit Bug Importer 2018-06-22 23:16:50 PDT
<rdar://problem/41393429>
Comment 2 Ryosuke Niwa 2022-07-10 20:14:20 PDT
Hm... I'm not reproducing the issue reported by this bug. :host::before and :host::after work using the keyframe animation defined within a shadow tree. What doesn't work is ::before/::after referencing keyframe defined in the outer scope.
Comment 3 Ryosuke Niwa 2022-07-10 20:14:56 PDT
Created attachment 460786 [details]
Test
Comment 4 Ryosuke Niwa 2022-07-10 20:16:03 PDT
keyframe not working in in the shadow DOM has been fixed in the bug 164608.
Comment 5 Ahmad Saleem 2023-12-31 09:29:22 PST
Chrome Canary 122 and Firefox Nightly 123 are working fine. So adding 'BrowserCompat'.