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

Option to prefix animation name to avoid conflict with same CSS animation names #1195

Open
ivalsaraj opened this issue Dec 15, 2020 · 3 comments
Assignees
Projects
Milestone

Comments

@ivalsaraj
Copy link

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Problem

The problem I've encountered is when I added animate css cdn into my site, there is a portion of site has gone invisible. After debugging many times I found out that a plugin using an it's own animation named slideInRight, so while loading the animate.css it conflict with the same animation name and the other plugin div section not showing anymore.

Solution

We already have a solution for prefix the class names using the animateConfig's prefix option. We would love to extend the functionality to prefix the animation names too.

There are 2 possible solutions I have to suggest

  1. if we add "animateConfig": {. "prefix": "animate__". } then it will prefix the animation names like this @keyframes animate__slideInOut
  2. Introduce a new config like this "animateConfig": { "prefix": "animate__", "animationPrefix": "animate_" } to prefix animation names

This can avoid conflict in using the same animation names by other scripts, fadeIn, fadeOut animation name are too common and so there is a high possibility if conflicting with the animation names if one have written their own custom animation vs the animate.css animation names.

@warengonzaga
Copy link
Member

Thanks for the report @ivalsaraj!

What do you think? @eltonmesquita? I can work on that.

@eltonmesquita
Copy link
Collaborator

That makes sense and yes, we should add It too, although I don't know if postCSS can make it easy to achieve as it made for classes. @warengonzaga, if you can have a look at this and propose a solution it would be great.

@eltonmesquita
Copy link
Collaborator

Also, we'll have to release a new major version (v5.0.0) when publishing this as we'll have a major breaking change. Maybe we could add a few new features - and maybe animations - like #1009 in the new release?

@eltonmesquita eltonmesquita added this to To do in V5.0.0 Jul 20, 2021
@eltonmesquita eltonmesquita added this to the v5 milestone Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
V5.0.0
To do
Development

No branches or pull requests

3 participants