csslessweb-compiler

VS web compiler, on minify css media queries disappear


I am using LESS to generate one CSS file from several smaller LESS files. Then this big file gets minified, and I use the minified version on my site. For the compilation of the LESS I am using "Web Compiler v.1.11.326" on visual studio 2015.

Everything was working fine, until at some point the minifier started removing some of my media queries (oddly not all of them). If I use the non-minified version of the file (that was still generated by Web Compiler), all works as expected (in it I have all the media queries).

Do any of you have any idea what may be the cause of something like this?


Solution

  • I found my problem, it turns out that having @keyframes inside @media is not strictly legal. (i tested my css with https://jigsaw.w3.org/css-validator/validator) I put different names for the keyframes and used difference keyframes for different media queries and it worked.