Pen Settings



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


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


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.


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.


                <div class="warning">Warning! Your browser does not support CSS container queries. Please open this demo in Chrome Canary with the experimental #enable-container-queries flag turned on.</div>

<div class="post">
  <div class="post__wrapper">
    <div class="post__thumb">pic</div>
    <div class="post__content">
      <h1 class="post_title">Super cool title</h1>
      <time class="post_time" datetime="2021-06-18">2021.06.18</time>
      <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Rem eveniet nemo quas quam delectus natus quae, maiores animi ut ducimus tenetur dignissimos? Rem, doloremque optio labore illo expedita sit suscipit voluptas sapiente cupiditate aspernatur sint!</p>


                * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;

body {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 1.6rem;
  font-family: -apple-system, BlinkMacSystemFont, segoe ui, Helvetica, Arial,
    sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;
  font-size: 1rem;
  line-height: 1.6rem;
  background: #eee;

.warning {
  margin-bottom: 1.6rem;
  background: #ffcdd2;
  border: 1px solid #e57373;
  padding: 1.6rem;

@supports (container-type: inline-size) {
  .warning {
    display: none;

.post {
  container-type: inline-size;
  container-name: post-container;
  resize: horizontal;
  overflow: auto;
  max-width: 100%;

.post__wrapper {
  padding: 1.6rem;
  border: 1px solid #ccc;
  background: #fff;

@container post-container (min-width: 400px) {
  .post__wrapper {
    display: grid;
    grid-template-columns: 4.8rem 1fr;
    grid-gap: 1.6rem;

.post__thumb {
  background: #ccc;
  width: 4.8rem;
  height: 4.8rem;
  float: left;
  margin-right: 1.6rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #888;
  text-transform: uppercase;
  font-size: 0.6rem;
  letter-spacing: 2px;

.post_title {
  font-size: 1rem;
  font-weight: 700;

.post_time {
  font-size: 0.8rem;
  margin-bottom: 0.8rem;
  display: block;