title: LESS CSS set variables in media query?
body: <p>I'm working on a iPad-specific website. To make my website work on both the retina display iPad and older versions of iPads, I want to set a variable in LESS CSS in media query like: </p>
  
  <pre><code>@media all and (max-width: 768px) {
      @ratio: 1;
  }
  
  @media all and (min-width: 769px) {
      @ratio: 2;  
  }
  </code></pre>
  
  <p>So when you are setting anything in pixels, you can do</p>
  
  <pre><code>width: 100px * @ratio;
  </code></pre>
  
  <p>But I got a compile error saying @ratio is not defined. Is it possible to have a workaround to make it work? Thanks.</p>