title: match elements with inline-style font-size for every absolute lengths units
body: <p>I need help for a jQuery fonction.</p>
  
  <p>Per say, i want to change the font-size of the whole document, first task is to increment the font size of the <code>&lt;body&gt;</code> tag in order to make all relative units, like em or rem, modified. But what about inlined font-size and old-timer <code>&lt;font size="x"&gt;</code>? Also, i want to apply the modification to <code>line-height</code> so everything re-format nicely.</p>
  
  <p>Can someone help finish this code with a filter that will match :</p>
  
  <ul>
  <li><code>&lt;font size="2"&gt;</code></li>
  <li><code>&lt;div style"font-size:14px;line-height:17px"&gt;</code></li>
  <li><code>&lt;div style"font-size:14‘cm’, ‘mm’, ‘in’, ‘pt’, ‘pc’ and ‘px’;line-height:xyz"&gt;</code></li>
  </ul>
  
  <p>html</p>
  
  <pre><code>&lt;div class='parent' style='font-size:15px'&gt;
      &lt;div&gt;div 1 no inline styling&lt;/div&gt;
      &lt;div style='font-size:1em'&gt;div 2 inlined font-size 1em&lt;/div&gt;
      &lt;div class='div-3'&gt;div 3, CSS font-size:14px;&lt;/div&gt;
      &lt;div style='font-size:22px'&gt;div 4 inlined font-size 22px&lt;/div&gt;
      &lt;div style='font-size:16pt'&gt;div 5 inlined font-size 16pt&lt;/div&gt;
      &lt;div style='font-size:80%'&gt;div 6 inlined font-size 80%&lt;/div&gt;
      &lt;div&gt;&lt;font size="2"&gt;legacy html font size="2"&lt;/font&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div id="output_box"&gt;&lt;/div&gt;
  </code></pre>
  
  <p><em>After a few trys and helping answers from <a href="https://stackoverflow.com/questions/20592932/jquery-match-elements-with-style-font-size-in-px">@wared and @ZaheerAhmed</a></em> , i could reform this javascript. I don't know how to test for every lenght units targeted otherwise than a multiple <code>if-then-else</code> algorythm and the use of universal selector <code>'*'</code> might not be a good idea, any suggestions?.</p>
  
  <p>javascript :</p>
  
  <pre><code>$("#trigger").click(function() {
      /* the overall body tag for relative units */
      $("body").css("font-size","+=5%");
      /* targetting inlined font-size in pixels */     
      $('*').each(function (index, value) {
          if (/font-size:[^;]+px/.test($(this).attr('style'))) {
              $(this).css("font-size","+=2");
          }
      });
  });
  </code></pre>
  
  <p>I prepared <a href="http://jsfiddle.net/wqM3V/11/" rel="nofollow noreferrer">a jsFiddle</a></p>
  
  <hr>
  
  <p><em><a href="http://msdn.microsoft.com/library/ms537660.aspx" rel="nofollow noreferrer">msdn values and units reference</a></em></p>
  
  <p>Relative length units</p>
  
  <ul>
  <li>em    The computed font-size. ex  The height of a lowercase "x".</li>
  <li>px    Pixels, relative to the viewing device.</li>
  <li>% Percentage.</li>
  <li>rem   The font size of the root element.</li>
  <li><em>those are not to consider with actual question</em></li>
  <li>vw    The viewport width.</li>
  <li>vh    The viewport height.</li>
  <li>vm    The smaller value of viewport width or height.</li>
  <li>ch    Zero-width (width of the zero glyph in the rendering font).</li>
  </ul>
  
  <p>Absolute length units</p>
  
  <ul>
  <li>in    Inches (1 inch = 2.54 centimeters).</li>
  <li>cm    Centimeters.</li>
  <li>mm    Millimeters.</li>
  <li>pt    Points (1 point = 1/72 inches).</li>
  <li>pc    Picas (1 pica = 12 points).</li>
  </ul>
  
  <hr>
  
  <p><a href="http://msdn.microsoft.com/en-us/magazine/jj687762.aspx" rel="nofollow noreferrer">A usefull article from Klemen Slavič</a> </p>