ARTICLE AD BOX
I'm trying to dynamically change the color of a Lottie animation using CSS, but I can't set the color using CSS at all. Here's the CSS that I'm using:
#lottie-container svg path { stroke: #ff0000 !important; }This, unfortunately, does not work. I read about a different solution where you can rename the stroke and then reference it with a class, but my path is inside a group, which means the stroke can't be renamed.
Screenshot of Shape Layer
However, if I manually set the color using JavaScript, it does work.
const paths = container.querySelectorAll("#lottie-container svg path"); paths.forEach((path) => { path.style.stroke = "red"; });I'm just curious if it's something that is going wrong in After Effects, something I'm not writing correctly in the CSS, or something that's just entirely not possible. Any help on the matter would be great.
