madebysource / lesshat

Smart LESS CSS mixins library.
lesshat.com
MIT License
2.19k stars 258 forks source link

Problem with @variable in keyframe mixin #88

Closed tine2k closed 10 years ago

tine2k commented 10 years ago

I am using 2.0.15 and I have the following problem:

The following

@mycolor: #FFF; .lh-keyframes(~'active-bottom-border-animation, 0% { border-bottom-color: @mycolor; } 100% { border-bottom-color: red }');

generates

lesshat-selector { -lh-property: 0; }

@-webkit-keyframes active-bottom-border-animation { 0% { border-bottom-color: ; } 100% { border-bottom-color: #ff0000; } } ...

It it seem to me I can't use the variable @mycolor in the keyframe-definition part. Is this a known limitation of the keyframes mixin?

petrbrzek commented 10 years ago

Hey, just use your variable like this:

.lh-keyframes(~'active-bottom-border-animation, 0% { border-bottom-color: @{mycolor}; }');

It should be working just fine.

tine2k commented 10 years ago

Thanks for your reply. It works fine now!