title: Material Design Icons: Google's recommended font sizes look bad on desktop screens... Fix?
body: <h1>Material Design Icons</h1>
  
  <p><strong>(Icon fonts not sized correctly)</strong></p>
  
  <hr>
  
  <p>I know I can fix them w/ css (I've done that below in the code snippet). But why? Is there a CSS technique I can add to the style sheet so this won't happen?</p>
  
  <p>Google recommends that you set your Material Design icons to these sizes:</p>
  
  <pre><code>    .material-icons.md-18 { font-size: 18px; }
      .material-icons.md-24 { font-size: 24px; }
      .material-icons.md-36 { font-size: 36px; }
      .material-icons.md-48 { font-size: 48px; }
  </code></pre>
  
  <p>But when doing so, the material icons are distorted on 'Desktop' screens. 'Mobile' screens have no problem because of the DPI resolution is better. This problem of course, doesn't only exist with font-icons but other web fonts as well (Roboto, being one of the more popular ones). </p>
  
  <p>Am I doing something wrong here? What's the best way to approach this?</p>
  
  <p>Here's an image of what I'm seeing on my screen <br></p>
  
  <blockquote>
    <p>(you'll have to open it up in new window to see full resolution):</p>
  </blockquote>
  
  <p><br></p>
  
  <p><a href="https://i.stack.imgur.com/IiZv7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/IiZv7.png" alt="enter image description here"></a></p>
  
  <p><strong>Here's my code:</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>/* Reset */
  *, *:after, *:before, *:focus { margin: 0; padding: 0; box-sizing: border-box; outline: 0; }
  html { font-family: "Arial"; }
  body { padding: 2rem; }
  h1 { padding: 0 0 1rem; }
  h3 { padding: 0 0 1rem; }
  ul { list-style: none; }
  section { padding: 1rem; margin: 0 0 1rem; }
  
  
  /* Material Design Icons */
  @font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-weight: 400;
    src: local('Material Icons'), local('MaterialIcons-Regular'), url(https://fonts.gstatic.com/s/materialicons/v14/2fcrYFNaTjcS6g4U3t-Y5ZjZjT5FdEJ140U2DJYC3mY.woff2) format('woff2');
  }
  
  
  .material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
  }
  
  
  /* Icon Sizes (BAD) */    
  .md-18 { font-size: 18px; } 
  .md-24 { font-size: 24px; } 
  .md-36 { font-size: 36px; } 
  .md-48 { font-size: 48px; }
  
  
  /* Icon Sizes (GOOD) */    
  .md-14 { font-size: 14px; }
  .md-29 { font-size: 29px; } 
  .md-34 { font-size: 34px; }
  .md-44 { font-size: 44px; }
  .md-48 { font-size: 48px; }
  
  /* Bad - Good */
  .bad { background: rgba(235, 90, 70, .47); }
  .good { background: rgba(81, 232, 152, .47); }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;h1&gt;Material Design Icons&lt;/h1&gt;
  
  &lt;section class="bad"&gt;
    &lt;h3&gt;Bad (Google reccommends)&lt;/h3&gt;
    &lt;ul&gt;
      &lt;li&gt;
        &lt;span&gt;Font Size: 18px&lt;/span&gt; &lt;i&gt;(.md-18)&lt;/i&gt;
        &lt;i class="material-icons md-18"&gt;dehaze&lt;/i&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;span&gt;Font Size: 24px&lt;/span&gt; &lt;i&gt;(.md-24)&lt;/i&gt;
        &lt;i class="material-icons md-24"&gt;dehaze&lt;/i&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;span&gt;Font Size: 36px&lt;/span&gt; &lt;i&gt;(.md-36)&lt;/i&gt;
        &lt;i class="material-icons md-36"&gt;dehaze&lt;/i&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;span&gt;Font Size: 48px&lt;/span&gt; &lt;i&gt;(.md-48)&lt;/i&gt;
        &lt;i class="material-icons md-48"&gt;dehaze&lt;/i&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/section&gt;
  
  &lt;section class="good"&gt;
    &lt;h3&gt;Good&lt;/h3&gt;
    &lt;ul&gt;
      &lt;li&gt;
        &lt;span&gt;Font Size: 14px&lt;/span&gt; &lt;i&gt;(.md-14)&lt;/i&gt;
        &lt;i class="material-icons md-14"&gt;dehaze&lt;/i&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;span&gt;Font Size: 29px&lt;/span&gt; &lt;i&gt;(.md-29)&lt;/i&gt;
        &lt;i class="material-icons md-29"&gt;dehaze&lt;/i&gt;
      &lt;/li&gt;    
      &lt;li&gt;
        &lt;span&gt;Font Size: 34px&lt;/span&gt; &lt;i&gt;(.md-34)&lt;/i&gt;
        &lt;i class="material-icons md-34"&gt;dehaze&lt;/i&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;span&gt;Font Size: 44px&lt;/span&gt; &lt;i&gt;(.md-44)&lt;/i&gt;
        &lt;i class="material-icons md-44"&gt;dehaze&lt;/i&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;span&gt;Font Size: 48px&lt;/span&gt; &lt;i&gt;(.md-48)&lt;/i&gt;
        &lt;i class="material-icons md-48"&gt;dehaze&lt;/i&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/section&gt;</code></pre>
  </div>
  </div>
  </p>