title: Convert css calc function to value in px
body: <p>I'm trying to set the minimum height of some element to the minimum width of another. That minimum width of some element is given using some calc formula in less, and that formula might change later on. I tried setting the min-height to the min-width using JQuery, but it simply inserted the calc equation that didn't give the same output because 20% of the width is not 20% of the height. I was looking at <a href="https://stackoverflow.com/questions/11117216/css-width-calc100-100px-alternative-using-jquery">css width: calc(100% -100px); alternative using jquery</a>, but the solutions for that equation requre knowing what the formula was in the jquery, and I want to write my code such that it works no matter how much you change the calc formula in the less.</p>
  
  <p>Example: <a href="http://jsfiddle.net/n6DAu/2116/" rel="nofollow noreferrer">http://jsfiddle.net/n6DAu/2116/</a></p>
  
  <pre><code>$(element).width() returns the width in pixels
  $(element).css('min-width') returns the equation
  </code></pre>