Skip to content

Animation keyframe name is not always transformed to local scope name #83

Open
@ghost

Description

Actual:
The following input,

@keyframes slideIn {
  0% {
    margin-left: 100%;
  }
  100% {
    margin-left: 0%;
  }
}

.case-1 {
  animation: 2s slideIn;
}

.case-2 {
  animation: slideIn 2s;
}

when using the command,
postcss input.css -u postcss-modules -o output.css

generates the following output

@keyframes _slideIn_1329k_1 {
  0% {
    margin-left: 100%;
  }
  100% {
    margin-left: 0%;
  }
}

._case-1_1329k_19 {
  animation: 2s :local(slideIn);
}

._case-2_1329k_27 {
  animation: _slideIn_1329k_1 2s;
}

Expected
I would expect the keyframe name to be transformed in both cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions