madebysource / lesshat

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

Workaround to fix semicolon syntax issue with keyframes #140

Open arbylee opened 9 years ago

arbylee commented 9 years ago

Context: Lessc is adding a semicolon at the end of keyframes definition, which is invalid css and causes issues on some devices. This also creates issues if you use anything that parses your css such as grunt-cache-bust.

This adds a noop rule at the end of each keyframes definition, leading to valid css

arbylee commented 9 years ago

This should fix issues seen in #139 and #129. Not my favorite code, but I'm hoping to get a discussion going about other possible solutions. From what I could tell, lessc is the one adding that additional semicolon, which is actually invalid for a keyframes definition

OpakAlex commented 9 years ago

@arbylee problem with @-webkit-keyframes too. you fix in @keyframes... but not in @-webkit-keyframes

rlecaro2 commented 9 years ago

I'm currently using your fix so my grunt compiles correctly. I suscribed to this thread so I can port my lesshat version when this is merged.

Thanks, @arbylee.

ndesorden commented 9 years ago

Thanks arbylee, your fix works perfectly.

The extra colon a the top of a css file was causing htc one "not understand" some following css rules!

Remco75 commented 8 years ago

nice one, will it be merged, or will there be another fix?