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.

            
              <div class="aspect-ratio-box">
  <div class="aspect-ratio-box-inside">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maiores harum, cum odio consequuntur ea nam doloremque saepe illum excepturi veniam. Officia fugit ex
  </div>
</div>

<div class="aspect-ratio-box">
  <div class="aspect-ratio-box-inside">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nostrum doloremque similique officia deleniti, ducimus inventore voluptatibus doloribus aut possimus quia error, quidem quibusdam, dolor mollitia atque perspiciatis laudantium fugiat vero nobis! Reprehenderit facere dolore natus mollitia, nobis atque cum alias ut nulla! Blanditiis vitae porro, saepe sed quis natus asperiores sunt perspiciatis. Quod maiores et deserunt dolorum at obcaecati tempore provident iusto vitae reiciendis aperiam illum possimus modi odit ratione doloribus praesentium distinctio, quaerat quis alias. Ratione architecto, rerum deleniti officia consequuntur voluptatem dignissimos! Nisi sed ipsam modi voluptates, sapiente asperiores animi quas illum vitae architecto amet autem, placeat voluptatem culpa distinctio! At, aspernatur a harum hic eum, eveniet aliquid mollitia doloribus. Eaque amet sapiente labore impedit maiores distinctio expedita, aliquam alias dolorum tenetur ipsa unde? Debitis soluta, ad laboriosam eum ut minima hic error voluptates, maxime nisi. Sunt natus quos, earum deserunt sapiente nemo itaque! Incidunt ipsam modi recusandae neque architecto soluta dolorum earum unde, maxime voluptate ad eius dolorem! Nisi quas impedit nesciunt! Numquam, aut et deserunt quisquam voluptatibus vero incidunt. Quod esse fugit, eligendi dolores, ipsum repellat perferendis alias praesentium cupiditate consequatur earum blanditiis id fugiat. Molestias veritatis rerum sint in ut fugiat amet voluptas praesentium commodi?
  </div>
</div>
            
          
!
            
              .aspect-ratio-box {
  background: orange;
  max-width: 50vw;
  margin: 20px auto;
}
.aspect-ratio-box::before {
  content: "";
  width: 1px;
  margin-left: -1px;
  float: left;
  height: 0;
  padding-top: calc(591.44 / 1127.34 * 100%);
}
.aspect-ratio-box::after { /* to clear float */
  content: "";
  display: table;
  clear: both;
}
.aspect-ratio-box-inside {
  font-size: 1.5rem;
  line-height: 1.5;
}
            
          
!
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