Skip to content

Animation with CSS variables transforms incorrect #194

@Megoos

Description

@Megoos

Hello!

If you just try:

.container {
  --duration: 1.8s;
  animation: rotate var(--duration) linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}

on the Playground it will result to:

.EgL3uq_container {
  --duration: 1.8s;
  animation: rotate var(--duration) linear infinite
}

@keyframes EgL3uq_rotate {
  0% {
    transform: rotate(0deg)
  }
  to {
    transform: rotate(-360deg)
  }
}

As you can see in the animation CSS property, the name of animation is without hash. If you remove the css variable, the transformation will succeed.

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