<div class="example">
  <h1>Humane typography in the digital&nbsp;age</h1>
  <p class="meta">January 25, 2016 · By Matej Latin</p>
  <p class="category">thoughts on typography</p>
  <p class="intro">An Essay on Typography by Eric Gill takes the reader back to the year 1930. The year when a conflict between two worlds came to its term. The machines of the industrial world finally took over the handicrafts.</p>
  <p>The typography of this industrial age was no longer handcrafted. Mass production and profit became more important. Quantity mattered more than the quality. The books and printed works in general lost a part of its humanity. The typefaces were not produced by craftsmen anymore. It was the machines printing and tying the books together now. The craftsmen had to let go of their craft and became a cog in the process. An extension of the industrial machine.
</p>
<p>But the victory of the industrialism didn’t mean that the craftsmen were completely extinct. The two worlds continued to coexist independently. Each recognising the good in the other — the power of industrialism and the humanity of craftsmanship. This was the second transition that would strip typography of a part of its humanity. We have to go 500 years back in time to meet the first&nbsp;one.</p>
</div>
<!--   <p class="instructions">__ <br><br>Fluid typography example. Try resizing the browser window.</p>


<footer><h1>BETTER WEB TYPOGRAPHY FOR <span>A&nbsp;BETTER&nbsp;WEB</span></h1><p>A book by Matej Latin—Get yours at <a href="https://betterwebtype.com/book" target="_blank">betterwebtype.com</a></p></footer> -->
/* Start of example */

@function strip-unit($value) {
  @return $value / ($value * 0 + 1);
}

@mixin fluid-type($min-vw, $max-vw, $min-font-size, $max-font-size) {
  $u1: unit($min-vw);
  $u2: unit($max-vw);
  $u3: unit($min-font-size);
  $u4: unit($max-font-size);

  @if $u1 == $u2 and $u1 == $u3 and $u1 == $u4 {
    & {
      font-size: $min-font-size;
      @media screen and (min-width: $min-vw) {
        font-size: calc(#{$min-font-size} + #{strip-unit($max-font-size - $min-font-size)} * ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)}));
      }
      @media screen and (min-width: $max-vw) {
        font-size: $max-font-size;
      }
    }
  }
}

$min_width: 320px;
$max_width: 1200px;
$min_font: 16px;
$max_font: 24px;

$mod_1: 1.2; // mobile
$mod_2: 1.5; // desktop

html {
  @include fluid-type($min_width, $max_width, $min_font, $max_font);
}

body {
  padding: 2% 5%;
  font-family: Georgia, serif;
  line-height: 1.4;
}

h1 {  
  font-weight: normal;
  max-width: 10em;
  font-size: $mod_1*$mod_1*$mod_1*$mod_1 *1rem; 
  @include fluid-type($min_width, $max_width, $mod_1*$mod_1*$mod_1 *$min_font, $mod_2*$mod_2*$mod_2 *$min_font);
}

.meta {
  font-style: italic;
}

.category {
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

p {
  max-width: 25em;
}

/* End of example */

.instructions {
  font-family: sans-serif;
  font-size: 18px!important;
  max-width: 25em;
}

footer {
  margin-top: 4em;
}

@media screen and (min-width: 48em){
  footer {
    margin-top: 0;
    position: fixed;
    bottom: 4%;
    right: 2%;
    text-align: right;
  }
}

footer h1 {
  font-size: 24px;
  font-family: "acumin-pro-extra-condensed",sans-serif;
  margin-bottom: 0;
}

footer span {
  color: #F15D64;
}

footer p {
  font-size: 16px;
  font-family: Georgia, serif;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.