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

Issues when using multiple components on same page because CSS is not scoped #21

Open
ewagstaff opened this issue Nov 28, 2018 · 1 comment

Comments

@ewagstaff
Copy link

ewagstaff commented Nov 28, 2018

Great module! Having issues using it to draw multiple paths at once because the CSS isn't scoped to current line's class, so it will get modified by the next line. Here's the CSS output:

.mt-true path:nth-of-type( 1 ) {
        opacity:                 0.01;
        stroke-dasharray:        352.7;
        stroke-dashoffset:       352.7;
        -webkit-animation:       mt-true-1 5s ease forwards;
        animation:               mt-true-1 5s ease forwards;
        -webkit-animation-delay: 0s;
        animation-delay:         0s;
}

If the CSS rule were attached to the class specified in "className", there wouldn't be a problem.

@ewagstaff
Copy link
Author

I realize after looking into the source that .mt-true is composed using the animate prop's string. This isn't clear in the docs but works fine, so maybe just a clarifying note would work.

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

1 participant