Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lacks CSS theming / fill & stroke colors not changeable in CSS #84

Open
rossbulat opened this issue Apr 9, 2023 · 9 comments
Open

Lacks CSS theming / fill & stroke colors not changeable in CSS #84

rossbulat opened this issue Apr 9, 2023 · 9 comments

Comments

@rossbulat
Copy link

rossbulat commented Apr 9, 2023

The dot lottie player seemingly ignores all external CSS rules, even if important!, with the inline fill and stroke attributes always taking precedence.

This is troublesome for theming (we don't really want to maintain 2 versions of the icons for light, dark modes).

Perhaps I am missing something but I am not seeing a way to inject classes or change the default colors of dot lottie animations.

It would be useful for the <dotlottie-player> tag to take a svgStyle attribute that would allow us to access the CSS directly within the shadow root.

@samuelOsborne
Copy link
Contributor

hi @rossbulat Are you talking about styling the player, or styling your animations using css classes?

@rossbulat
Copy link
Author

hi @rossbulat Are you talking about styling the player, or styling your animations using css classes?

Hey @samuelOsborne, thanks for following up! I'm talking about styling animations using css classes.

@samuelOsborne
Copy link
Contributor

@rossbulat Great. This is due to using the shadow DOM, I was looking in to ways of disabling its uses via a prop. This will fix the issue, will try and get a fix out for this week and ping you

@rossbulat
Copy link
Author

rossbulat commented Apr 12, 2023

@samuelOsborne Fantastic, thank you! Looking forward to testing, this will definitely cut down on the complexity of hosting multiple variations of SVG 👍

@rossbulat
Copy link
Author

Hey @samuelOsborne, did I miss the publish?

@samuelOsborne
Copy link
Contributor

Hey @rossbulat no, haven't gotten round to finishing it unfortunately

@rossbulat
Copy link
Author

Hey @rossbulat no, haven't gotten round to finishing it unfortunately

Ah ok, I will keep an eye out for updates!

@samuelOsborne
Copy link
Contributor

hey @rossbulat we're going with a better solution that will be released towards the end of this month, so I wont be implementing removing the shadowDOM for the moment

@rossbulat
Copy link
Author

Thanks for the update @samuelOsborne, looking forward to seeing the solution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants