Yes, and that works fine.
But then it complains about "-" which I expect to be the vendor prefixes like, -webkit, in the beginning of a code block. Even though it's not a code block
Very strange, I've been trying to replicate it but i'm not having any luck. Are you able to create a simple version of the issue? Maybe there is something else going on that's causing the issue.
Razor error when using embedded stylesheets containing @media and -webkit
Due to some google optimizations I'm embedding some of my CSS in my templates.
But the view engine isn't all that happy about it (look at the attached screenshot)
What can I do about it ?
Have you tried escaping the @ for the media query?
e.g.
<style>@@media screen and (min-width: 64.0625em) {.grid { -webkit-box-orient:vertical;}}</style>
Yes, and that works fine. But then it complains about "-" which I expect to be the vendor prefixes like, -webkit, in the beginning of a code block. Even though it's not a code block
Very strange, I've been trying to replicate it but i'm not having any luck. Are you able to create a simple version of the issue? Maybe there is something else going on that's causing the issue.
Hi Sebastian,
Perhaps you could move the CSS into its own file and render it out like this:
Steven
Hey Steven,
That did the trick. Good workaround, that doesn't require me to modify the CSS after minification.
Thanks.
is working on a reply...