-
Notifications
You must be signed in to change notification settings - Fork 80
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
Consider attaching className
to the outer-most container
#103
Comments
hi @kdembler Have you tried overriding It doesn't have any styling on our end, and was left for user's to add their own. |
Yes, we tried that. The issue is that like I said we would like to avoid having styles based on the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. |
Would it be possible to recheck this? One of the solution is to replace Another approach would be adding props for styling |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. |
Currently, even though the
Player
accepts aclassName
prop, it is not passed to the outer-most container of the animation. So the render tree will always be.lf-player-container > #lottie
and only#lottie
can be styled viaclassName
. This creates some issues when you need to style the most direct container of your views for layout purposes etc. Solutions that I would consider for this issue:className
to.lf-player-container
instead.lf-player-container
altogether and make#lottie
the direct container.lf-player-container
.At the moment the only way to style the
.lf-player-container
is to use some direct descendant selector or use the class name directly, but then we need to leak internal implementation of the library into our codebase which we consider a bad practice.Thanks for considering and thanks for the great library! :)
The text was updated successfully, but these errors were encountered: