Open
Description
Minifier break css when at-media & at-keyframes are used together.
This css:
@media (min-width: 0) and (max-width: 360px) {
@keyframes loop {
0% {
transform: translateX(0);
}
100% {
transform: translateX(calc(-100% + 360px));
}
}
}
@media (min-width: 480px) {
@keyframes loop {
0% {
transform: translateX(0);
}
100% {
transform: translateX(calc(-100% + 480px));
}
}
}
.a {
color: red
}
when minified and then re-formatted, produces this result:
@media (min-width: 0) and (max-width: 360px) {
@keyframes loop {
0% {
transform: translateX(0)
}
100% {
transform: translateX(calc(-100% + 360px))
}
}@media (min-width: 480px) {
@keyframes loop {
0% {
transform: translateX(0)
}
100% {
transform: translateX(calc(-100% + 480px))
}
}
} .a {
color: red
}
Notice the missing "}". If there's only one at-media + at-keyframes block, it works well, if there are more, it breaks all of them except the last one.
Metadata
Metadata
Assignees
Labels
No labels