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

comment in @keyframes declaration causes ParseError #2059

Closed
mbazaczek opened this issue Jun 18, 2014 · 5 comments
Closed

comment in @keyframes declaration causes ParseError #2059

mbazaczek opened this issue Jun 18, 2014 · 5 comments

Comments

@mbazaczek
Copy link

Hello, I've recently updated less.js in my WinLess complier, only to find that "@-webkit-keyframes hover" declaration now happily throws "ParseError: Unrecognised input".

I am now unable to vendor prefix my @Keyframes declarations.

I didn't found any mention of it in the changelog, so I suppose there is no alternative way of doing it as of 1.7.1.

Plx halp

@seven-phases-max
Copy link
Member

Could you please provide a specific code you get the error with? The simplest case compiles as expected:

@-webkit-keyframes hover {
    0%   {color: red}
    100% {color: blue}
}

@mbazaczek
Copy link
Author

Thanks for instant response!

You're right - that was not the culprit. Before update, this compiled just fine:

@-webkit-keyframes hover /* Safari and Chrome */{ ..keyframes... }

But as of 1.7.1 it throws ParseError.

I've removed the comments and now it compiles all OK.
Sorry for the inconvenience!

@seven-phases-max
Copy link
Member

Ah, I see, thanks! If I'm not mistaken it's a minor regression bug by #1860. Before it was possible to put any arbitrary value (incl. comments) after @keyframes before {, but now it expects only a single identifier or a variable.

@mbazaczek mbazaczek changed the title @keyframes variables broke @-webkit-keyframes comment in @keyframes declaration causes ParseError Jun 18, 2014
@mbazaczek
Copy link
Author

Indeed.

I've changed the ticket name to more accurate.

SomMeri pushed a commit to SomMeri/less-rhino.js that referenced this issue Aug 27, 2014
* in @Keyframe declaration less#2059,
* after rule name before semicolon less#826.

The comments are eaten instead of being printed into output, but it is
better then crashing on them.
@SomMeri
Copy link
Member

SomMeri commented Aug 31, 2014

Fixed by last commit.

@SomMeri SomMeri closed this as completed Aug 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants