Skip to content

@keyframes percentages are being converted incorrectly #92

@brossi

Description

@brossi

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)

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