Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="example">
  <h1>Humane typography in the digital&nbsp;age</h1>
  <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 & responsive typography combined. 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> -->
              
            
!

CSS

              
                /* Start of example */
$breakpoint-1: 25em;
$breakpoint-2: 35em;
$breakpoint-3: 45em;
$breakpoint-4: 55em;
$breakpoint-5: 65em;
$breakpoint-6: 75em;
$breakpoint-7: 85em;

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

h1 {
  font-weight: normal;
  font-size: 10vw;
  max-width: 90vw;
}

.intro {
  font-size: 5vw;
}

p {
  max-width: 90vw;
}

@media screen and (min-width: $breakpoint-1){
  body {
    font-size: 4vw;
  }
  
  p {
    max-width: 80vw;
  }
}

@media screen and (min-width: $breakpoint-2){
  body {
    font-size: 2.5vw;
  }
  
  p {
    max-width: 70vw;
  }
  
  h1 {
    font-size: 8vw;
  }
  
  .intro {
    font-size: 3.5vw;
  }
}

@media screen and (min-width: $breakpoint-3){
  body {
    font-size: 2vw;
  }
  
  p {
    max-width: 60vw;
  }
  
  h1 {
    font-size: 7vw;
  }
  
  .intro {
    font-size: 3vw;
  }
}

@media screen and (min-width: $breakpoint-4){
  body {
    font-size: 1.9vw;
  }
  
  p {
    max-width: 55vw;
  }
  
  h1 {
    font-size: 6vw;
  }
  
  .intro {
    font-size: 2.5vw;
  }
}

@media screen and (min-width: $breakpoint-5){
  body {
    font-size: 1.5vw;
  }
  
  p {
    max-width: 50vw;
  }
  
  h1 {
    font-size: 4vw;
    max-width: 45vw;
  }
  
  .intro {
    font-size: 1.9vw;
  }
}

@media screen and (min-width: $breakpoint-6){
  body {
    font-size: 1.4vw;
  }
  
  p {
    max-width: 40vw;
  }
  
  .intro {
    font-size: 1.8vw;
  }
  
  h1 {
    font-size: 4vw;
    max-width: 35vw;
  }
}

@media screen and (min-width: $breakpoint-7){
  body {
    font-size: 1.3vw;
  }
  
  .intro {
    font-size: 1.7vw;
  }
  
  h1 {
    font-size: 4vw;
    max-width: 35vw;
  }
}

/* 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;
}
              
            
!

JS

              
                
              
            
!
999px

Console