1

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?

  • Is it actually removed from CSS file? Maybe some minification script is wrong? What rules are removed? – Justinas Feb 27 '17 at 14:24
  • Some animations , something like this: @media screen and (max-width:(@media-width-threshold2 - 1)){@keyframes tab-control-arrows-move2{ – Nikola.grancharov Feb 27 '17 at 14:39

1 Answers1

0

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.