WebKit Bugzilla
Attachment 369091 Details for
Bug 197599
: [Web Animations] currentColor is not recalculated during animation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Should change color when parent element color is changed
webkitWebAnimationCurrentColor.html (text/html), 1.03 KB, created by
Vadim
on 2019-05-05 06:20:54 PDT
(
hide
)
Description:
Should change color when parent element color is changed
Filename:
MIME Type:
Creator:
Vadim
Created:
2019-05-05 06:20:54 PDT
Size:
1.03 KB
patch
obsolete
> ><!DOCTYPE html> ><html> ><head> > <meta http-equiv="content-type" content="text/html; charset=UTF-8"> > <title></title> > <meta name="viewport" content="width=device-width, initial-scale=1"> > > <style> > #container { > color: red; > } > </style> ></head> ><body> > <div id="container"> > <h3 id="el"> > Text > <svg height="100" width="100"> > <circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="currentColor" /> > </svg> > </h3> > </div> > > > <script> > document.getElementById("el").animate([ > { color: 'currentcolor' }, > { color: 'transparent' }, > ], { > duration: 1000, > iterations: Infinity > }); > > const colorGen = () => { > const r = Math.floor(Math.random() * 256) > const g = Math.floor(Math.random() * 256) > const b = Math.floor(Math.random() * 256) > return "rgb(" + r + "," + g + "," + b + ")" > } > > setInterval(() => { > document.getElementById("container").setAttribute("style", "color:" + colorGen()); > }, 1000) > </script> ></body> ></html>
<!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title></title> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> #container { color: red; } </style> </head> <body> <div id="container"> <h3 id="el"> Text <svg height="100" width="100"> <circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="currentColor" /> </svg> </h3> </div> <script> document.getElementById("el").animate([ { color: 'currentcolor' }, { color: 'transparent' }, ], { duration: 1000, iterations: Infinity }); const colorGen = () => { const r = Math.floor(Math.random() * 256) const g = Math.floor(Math.random() * 256) const b = Math.floor(Math.random() * 256) return "rgb(" + r + "," + g + "," + b + ")" } setInterval(() => { document.getElementById("container").setAttribute("style", "color:" + colorGen()); }, 1000) </script> </body> </html>
View Attachment As Raw
Actions:
View
Attachments on
bug 197599
: 369091