Skip to content

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

Open

Description

@JumpSlash

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

Activity

  1. davipt commented on Jun 11, 2015

    @davipt

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions