<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>186837</bug_id>
          
          <creation_ts>2018-06-20 01:23:30 -0700</creation_ts>
          <short_desc>:host::before and :host::after cannot reference a keyframe defined in an outer scope</short_desc>
          <delta_ts>2026-04-07 10:40:43 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Animations</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.13</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>296048</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=164608</see_also>
          <bug_file_loc>https://faithful-string.glitch.me/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>148695</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="RPG">rperezgamo</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>cdumez</cc>
    
    <cc>dino</cc>
    
    <cc>graouts</cc>
    
    <cc>karlcow</cc>
    
    <cc>koivisto</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1434718</commentid>
    <comment_count>0</comment_count>
    <who name="RPG">rperezgamo</who>
    <bug_when>2018-06-20 01:23:30 -0700</bug_when>
    <thetext>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/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1435788</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-06-22 23:16:50 -0700</bug_when>
    <thetext>&lt;rdar://problem/41393429&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1882004</commentid>
    <comment_count>2</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-07-10 20:14:20 -0700</bug_when>
    <thetext>Hm... I&apos;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&apos;t work is ::before/::after referencing keyframe defined in the outer scope.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1882005</commentid>
    <comment_count>3</comment_count>
      <attachid>460786</attachid>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-07-10 20:14:56 -0700</bug_when>
    <thetext>Created attachment 460786
Test</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1882006</commentid>
    <comment_count>4</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-07-10 20:16:03 -0700</bug_when>
    <thetext>keyframe not working in in the shadow DOM has been fixed in the bug 164608.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2002350</commentid>
    <comment_count>5</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-12-31 09:29:22 -0800</bug_when>
    <thetext>Chrome Canary 122 and Firefox Nightly 123 are working fine. So adding &apos;BrowserCompat&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2195487</commentid>
    <comment_count>6</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2026-03-31 03:49:45 -0700</bug_when>
    <thetext>The square is green on STP 239.
https://bug-186837-attachments.webkit.org/attachment.cgi?id=460786</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2195488</commentid>
    <comment_count>7</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2026-03-31 03:50:42 -0700</bug_when>
    <thetext>If the issue still exists we need a test exhibiting the breakage.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2197680</commentid>
    <comment_count>8</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2026-04-07 10:40:43 -0700</bug_when>
    <thetext>This was fixed by 300706@main, the fix for bug 296048.

*** This bug has been marked as a duplicate of bug 296048 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>460786</attachid>
            <date>2022-07-10 20:14:56 -0700</date>
            <delta_ts>2022-07-10 20:14:56 -0700</delta_ts>
            <desc>Test</desc>
            <filename>animation-shadow.html</filename>
            <type>text/html</type>
            <size>1465</size>
            <attacher name="Ryosuke Niwa">rniwa</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KPGJvZHk+CjxkaXYgaWQ9Imhvc3QxIj48
L2Rpdj4KPGRpdiBpZD0iaG9zdDIiPjwvZGl2Pgo8c3R5bGU+CkBrZXlmcmFtZXMgcnVuIHsKICAg
IGZyb20gewogICAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoMHB4KTsKICAgIH0KICAgIHRvIHsK
ICAgICAgdHJhbnNmb3JtOiB0cmFuc2xhdGVYKC01MHB4KTsKICAgIH0KfQo8L3N0eWxlPgo8c2Ny
aXB0PgoKaG9zdDEuYXR0YWNoU2hhZG93KHttb2RlOiAnY2xvc2VkJ30pLmlubmVySFRNTCA9IGAK
PHN0eWxlPgogICAgOmhvc3QgewogICAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgICAgd2lk
dGg6IDEwMHB4OwogIC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9zdDo6YmVmb3JlLAogICAg
Omhvc3Q6OmFmdGVyIHsKICAgICAgICBkaXNwbGF5OiBibG9jazsKICAgICAgICBhbmltYXRpb246
IHJ1biAwcyBmb3J3YXJkczsKICAgICAgICB3aWR0aDogMTAwcHg7CiAgICAgICAgaGVpZ2h0OiAy
MHB4OwogICAgICAgIGJhY2tncm91bmQ6IGxpbmVhci1ncmFkaWVudCg5MGRlZywgcmVkIDAlIDUw
JSwgZ3JlZW4gMCUgMTAwJSk7CiAgICAgICAgY29udGVudDogJyAnOwogICAgfQo8L3N0eWxlPjxk
aXY+PC9kaXY+YDsKCjwvc2NyaXB0Pgo8L2JvZHk+CjwvaHRtbD4KCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>