-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Automatically remove @keyframes duplicates #1506
Comments
This seems to fall into the same area as grouping media queries. However, instead of grouping it's more of a "collapse" situation. It would also need to be optional, however, since there may be a valid reason someone might want to override a It seems that in both cases, some sort of syntax to indicate that a rule is allowed to be "grouped" or "collapsed" would be necessary. |
|
You could get round this by setting a global variable and using a guard so |
@lukeapage |
it would need to be an option - some people might want a key frame referenced inline or in another stylesheet. |
@lukeapage |
I thought your problem was unused keyframes, not duplicates? |
I can think of two choices:
Your last comment is right, unused |
I found |
Feature will be in next minor release - 1.7 |
@lukeapage |
OK, I'll reopen this (probably @lukeapage mean some other |
https://github.com/Justineo/less-plugin-unique-directives Not fully tested yet. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi @Justineo , wondering if you found a better solution to this problem? |
Hi,
When writing animations I don't want
@keyframes
rules appear in final.css
files if they are not used (because if we support lots of animations that will be great amount of code). So I put a@keyframes
rule inside a mixin, like this:But if I call that mixin for several times, the
@keyframes
rule will also be repeated.will output (in global scope):
Is there a way to avoid this? (I'm using lessc 1.4.2)
The text was updated successfully, but these errors were encountered: