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

LESS Compile Error with Animation Keyframe Mixin #81

Open
someyoungideas opened this issue Jan 16, 2015 · 0 comments
Open

LESS Compile Error with Animation Keyframe Mixin #81

someyoungideas opened this issue Jan 16, 2015 · 0 comments

Comments

@someyoungideas
Copy link

So I recently found a great way to create mixin for animations using LESS and attempted in WE 2012. I was unable to get the file to compile unfortunately. It seems to be having issues with the @arguments being passed into the .keyframes. Allowing variables with @keyframes was allowed in LESS starting v1.7.0, https://github.com/less/less.js/blob/master/CHANGELOG.md. Here is my code

.whywouldyoudothis {
    .keyframes(blink;
        {
            0% { background: #fff; }
            100% { background: #000; }
        });

    .animation(blink 1s ease inifinite alternate);
}

.keyframes(@name; @arguments) {
    @-moz-keyframes @name { @arguments(); }
    @-webkit-keyframes @name { @arguments(); }
    @-o-keyframes @name { @arguments(); }
    @keyframes @name { @arguments(); }
}

.animation(@arguments) {
    -webkit-animation: @arguments;
    -moz-animation: @arguments;
    animation: @arguments;
}

And here is the compile error
LESS: Unrecognised input

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