Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <script src="https://cdn.typetura.com/typetura.js"></script>
<link id="package" rel="stylesheet" type="text/css" href="https://cdn.typetura.com/squared-off/typetura.css">

<article>
  <section class="intro">
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/467/responsive-showcase.png" alt="Typetura responsive showcase" class="showcase">
    <h1 class="primary-headline">Introducing Typetura</h1>
    <h2 class="primary-subheadline">Responsive typography made easy</h2>
    <p class="large"><a href="https://typetura.com/">Typetura</a> is a responsive typography solution that just works, on any website, in any layout, and on any device. Just add one of our packages to your website and we deliver not only fonts, but typesetting as well. Complete with variable font support and a huge selection of typographic components to choose from, we’ve got you covered. If you’re looking for support in building your own responsive typographic system or using variable fonts, we can do that too! Just reach out to us, and let’s talk!</p>
  </section>
  
  <section class="contexts">
    <section class="context">
      <h1 class="primary-headline">Context aware</h1>
      <h2 class="primary-subheadline">Type that automatically adjusts to any layout on any device</h2>
    </section>
    <section class="context">
      <h1 class="primary-headline">In medium contexts</h1>
      <h2 class="primary-subheadline">Typetura just works. See? Your text scales down to fit</h2>
    </section>
    <section class="context">
      <h1 class="primary-headline">And small contexts</h1>
      <h2 class="primary-subheadline">Where your layout really crunches things down</h2>
    </section>
  </section>
  
  <section class="colors">
    <section class="color">
      <div class="typetura color-container">
        <h1 class="primary-headline">Add your own palette</h1>
        <h2 class="primary-subheadline">Work with your existing brand colors</h2>
      </div>
    </section>
    <section class="color">
      <div class="typetura color-container">
        <h1 class="primary-headline">Make it colorful</h1>
        <h2 class="primary-subheadline">Have fun and make it pop</h2>
      </div>
    </section>
    <section class="color">
      <div class="typetura color-container">
        <h1 class="primary-headline">Make it you</h1>
        <h2 class="primary-subheadline">Reach out; discover every possibility</h2>
      </div>
    </section>
  </section>
  <a href="https://typetura.com" class="cta-link">
    <section class="cta">
      <img class="logo" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/467/logo.png" alt=" ">
      <p class="large">Discover responsive typography at Typetura.com</p>
    </section>
  </a>
</article>

<nav>
  <span>Package:</span>
  <select onChange="package(this.options[this.selectedIndex].value)">
    <option value="bullseye">Bullseye</option>
    <option value="magazine-moderne">Magazine Moderne</option>
    <option value="nova">Nova</option>
    <option value="rustic">Rustic</option>
    <option value="squared-off" selected>Squared Off</option>
    <option value="zine">Zine</option>
  </select>
</nav>

            
          
!
            
              :root {
  --background: #ffebe5;
  --background-alt: #fff;
  --color: #142226;
}

body {
  margin: 0;
  color: var(--color);
  background: var(--background);
  overflow-x: hidden;
}

a {
  color: #129681;
}

article > section {
  padding: calc(50px + 4%) 3vw 3vw;
  margin: 0;
}

.intro {
  max-width: 800px;
  margin: 0 auto 1rem;
}

.showcase {
  width: 80%;
  margin-bottom: 2rem;
}

.contexts {
  position: relative;
  z-index: 1;
  padding: 0;
  display: grid;
  width: 100%;
  border: .5px solid;
  border-width: .5px 0;
  grid-template-rows: auto auto;
  grid-template-columns: 2fr 1fr;
  @media (min-width: 1000px) {
    grid-template-rows: auto;
    grid-template-columns: 3fr 2fr 1fr;
  }
}
.context {
  padding: 3vw;
  border: 1px solid #129681;
  margin: -1px;
  background: var(--background-alt);
  &:nth-child(1) {
    grid-column: span 2;
    @media (min-width: 1000px) {
      grid-column: initial;
    }
  }
}

.colors {
  display: flex;
  padding: 0;
  margin: 0 -2vw;
  overflow: hidden;
}
.color {
  padding: 5vw;
  overflow: hidden;
  flex: 1;
  transition: all .3s ease-in-out;
  box-shadow: 0 0 5vw rgba(#000,.4);
  transform: skew(-6deg);
  &:hover {
    flex: 10;
  }
  &:nth-child(1) {
    color: hsl(10deg,20%,90%);
    background: hsl(210deg,50%,20%);
  }
  &:nth-child(2) {
    color: hsl(0deg,0%,100%);
    background: hsl(345deg,70%,50%);
  }
  &:nth-child(3) {
    color: hsl(0deg,50%,20%);
    background: hsl(220deg,70%,90%);
  }
}
.color-container {
  width: calc(70vw);
  transform: skew(6deg);
}

.cta {
  display: flex;
  align-items: center;
}
.logo {
  width: 16%;
  max-width: 200px;
}
.cta-link {
  text-decoration: none;
}

nav {
  position: fixed;
  top: 0;
  right: 3vw;
  padding: .5em .5em .5em 0;
  border-radius: 0 0 12px 12px;
  display: flex;
  justify-content: flex-end;
  background: #085147;
  color: #fff;
  box-shadow: 0 2px 30px rgba(#000,.4);
  align-items: center;
  z-index: 9;
  span {
    display: flex;
    align-items: center;
    margin-left: 20px;
  }
  select {
    background: none;
    color: inherit;
    border-radius: 6px;
    border: 2px solid #129681;
    font-family: inherit;
    margin-left: .5em;
    padding: 0;
    outline: none;
    -moz-appearance: none;
    cursor: pointer;
    &:hover,
    &:focus {
      border-color: #ed8600;
    }
  }
}

            
          
!
            
              const pack = document.getElementById('package');

function package(e) {
  pack.setAttribute('href', `https://cdn.typetura.com/${e}/typetura.css`);;
}

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console