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

Keyframes compiled css contains an extra semicolon - affecting the HTC One stock android browser #139

Open
JumpSlash opened this issue Dec 17, 2014 · 1 comment

Comments

@JumpSlash
Copy link

Hi

I have a very specific bug with my LESS using the Lesshat keyframes mixin. There appears to be an extra semicolon which breaks the CSS for the HTC One stock android browser. So far this is the only device/browser that I've seen affected but there could be others.

I have the following LESS:

.keyframes(~'swing, 0% { transform: rotate(-15deg) } 100% { transform: rotate(15deg) }');

Which gets compiled to:

lesshat-selector {
-lh-property: 0; } 
@-webkit-keyframes swing{ 0% { -webkit-transform: rotate(-15deg) } 100% { -webkit-transform:     rotate(15deg) }}
@-moz-keyframes swing{ 0% { -moz-transform: rotate(-15deg) } 100% { -moz-transform: rotate(15deg) }}
@-o-keyframes swing{ 0% { -o-transform: rotate(-15deg) } 100% { -o-transform: rotate(15deg) }}
@keyframes swing{ 0% {-webkit-transform: rotate(-15deg);-moz-transform: rotate(-15deg);-ms-transform: rotate(-15deg);transform: rotate(-15deg);} 100% {-webkit-transform: rotate(15deg);-moz-transform: rotate(15deg);-ms-transform: rotate(15deg);transform: rotate(15deg);};
}

The offending semicolon seems to be the one right at the end, before the final brace '}'.

I believe this could also be the cause of this issue: #129

Thanks

JumpSlash

@davipt
Copy link

davipt commented Jun 11, 2015

This major issue is now also affecting Safari on OS X 10.11 and iOS 9 betas.
The issue is not the extra semicolon at the end of the @Keyframes, but the fact that the line is not terminated by the "}" on a contiguous line, but on the line below.
If you try to move the last "}" up, it starts working with Safari. I assume the same will happen with the HTC. Even the less hat code mentions that the "@*keyframes must be in a single line".
I've added a pull requests that moves the "}" up, by having to create a fake line below it. Please see it below.

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

2 participants