I'm using the default bundling and minification in MVC 4.
One of our stylesheets starts with this bit of CSS:
@media (max-width: 979px) {
@keyframes sidebarSlideInRight {
from { right: -220px }
to { right: 0 }
}
@-webkit-keyframes sidebarSlideInRight {
from { right: -220px }
to { right: 0 }
}
}
The minification fails with this error: run-time error CSS1019: Unexpected token, found '}' and it points to the first character on line 13 (that's the very last } in the snippet above).
I'm not overly familiar with CSS in general and I was wondering:
@keyframes declarations must be outside media queries.
@keyframes sidebarSlideInRight {
from { right: -220px }
to { right: 0 }
}
And then you use them in the media query like this:
@media (max-width: 979px) {
.some-class {
animation: sidebarSlideInRight 1s;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With