mojotech / sass2stylus

Kewl
http://sass2stylus.com/
79 stars 18 forks source link

@keyframes percentages are being converted incorrectly #92

Open brossi opened 9 years ago

brossi commented 9 years ago

I noticed that when running sass2stylus on .scss files that contain @keyframes rules that the output was incorrectly appending nested keyframe selectors with "$" instead of "%".

original.scss

@mixin topbar-x-rotation(){
    @keyframes topbar-x {
      0% {top: 0px; transform: rotate(0deg); }
      45% {top: 6px; transform: rotate(145deg); }
      75% {transform: rotate(130deg); }
      100% {transform: rotate(135deg); }
    }
}

output.styl

topbar-x-rotation()
  @keyframes
    0$
      top: 0px
      transform: rotate(0deg)
    45$
      top: 6px
      transform: rotate(145deg)
    75$
      transform: rotate(130deg)
    100$
      transform: rotate(135deg)

The expected output should be:

topbar-x-rotation()
  @keyframes
    0%
      top: 0px
      transform: rotate(0deg)
    45%
      top: 6px
      transform: rotate(145deg)
    75%
      transform: rotate(130deg)
    100%
      transform: rotate(135deg)