animation-name-in-shadow-part-inner-match.html (932B)
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: blue } 21 } 22 23 #shadow::part(target) { 24 height: 100px; 25 width: 100px; 26 background-color: red; 27 } 28 29 </style> 30 31 <div id="shadow"> 32 <template shadowrootmode="open"> 33 <style> 34 @keyframes animation { 35 from, to { background-color: green } 36 } 37 38 div { 39 animation: animation 1s both; 40 } 41 </style> 42 <div part="target"></div> 43 </template> 44 </div> 45 46 </body> 47 </html>