animation-name-in-shadow-part-outer-match.html (905B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Matching animation-name from within a shadow root with multiple @keyframes rules</title> 5 <link rel="author" title="Antoine Quint" href="mailto:graouts@webkit.org"> 6 <link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=296048"> 7 <link rel="help" href="https://drafts.csswg.org/css-scoping-1/#shadow-names"> 8 <link rel="match" href="animation-name-in-shadow-part-ref.html"> 9 </head> 10 <body> 11 12 <style> 13 14 #shadow { 15 width: 100px; 16 height: 100px; 17 } 18 19 @keyframes animation { 20 from, to { background-color: green } 21 } 22 23 #shadow::part(target) { 24 height: 100px; 25 width: 100px; 26 animation: animation 1s both; 27 background-color: red; 28 } 29 30 </style> 31 32 <div id="shadow"> 33 <template shadowrootmode="open"> 34 <style> 35 @keyframes animation { 36 from, to { background-color: blue } 37 } 38 </style> 39 <div part="target"></div> 40 </template> 41 </div> 42 43 </body> 44 </html>