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.

            
              <h2>space-grid-row</h2>
<p>It's a Grid-backed row. Just set the --gap variable to specify the gutter.</p>
<div class="my space-grid-row">
  <div class="item"></div>
  <div class="item"></div>
  <div class="item"></div>
</div>

<h2>space-grid-col</h2>
<p>It's a Grid-backed column. Just set the --gap variable to specify the gutter.</p>
<div class="my space-grid-col">
  <div class="item"></div>
  <div class="item"></div>
  <div class="item"></div>
</div>

<h2>space-wrapping-row</h2>
<p>
  This container wraps and allows to specify row and column gaps.
</p>
<div class="my space-wrapping-row">
  <div>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
    </div>
  </div>
</div>

<h2>space-flex-row</h2>
<p>It's just a Flexbox row. If you need a gutter, you must use explicit separator elements.</p>
<div class="space-flex-row">
  <div class="item"></div>
  <div class="my space-col-separator"></div>
  <div class="item"></div>
  <div class="my space-col-separator"></div>
  <div class="item"></div>
</div>

<h2>space-flex-col</h2>
<p>It's just a Flexbox column. If you need a gutter, you must use explicit separator elements.</p>
<div class="space-flex-col">
  <div class="item"></div>
  <div class="my space-row-separator"></div>
  <div class="item"></div>
  <div class="my space-row-separator"></div>
  <div class="item"></div>
</div>

<h2>space-overlay-top, space-overlay-bottom, space-overlay-left, space-overlay-right</h2>
<p>These components allow to escape the main layout and add overlay elements. Especially useful for little labels and other similar components.</p>
<br />
<div class="my space-wrapping-row">
  <div>
    <div class="space-overlay-top">
      <div class="little-item"></div>
      <div class="item"></div>
    </div>
    <div class="space-overlay-right">
      <div class="little-item"></div>
      <div class="item"></div>
    </div>
    <div class="space-overlay-bottom">
      <div class="little-item"></div>
      <div class="item"></div>
    </div>
    <div class="space-overlay-left">
      <div class="little-item"></div>
      <div class="item"></div>
    </div>
  </div>
</div>

<h2>space-center</h2>
<p>Places its children in the center.</p>
<div class="space-center" style="width: 500px; height: 100px;">
  <div class="item"></div>
</div>

<h2>space-left</h2>
<p>Places its children on the left.</p>
<div class="space-left" style="width: 500px; height: 100px;">
  <div class="item"></div>
</div>

<h2>space-right</h2>
<p>Places its children on the right.</p>
<div class="space-right" style="width: 500px; height: 100px;">
  <div class="item"></div>
</div>

<h2>space-top</h2>
<p>Places its children at the top.</p>
<div class="space-top" style="width: 500px; height: 100px;">
  <div class="item"></div>
</div>

<h2>space-bottom</h2>
<p>Places its children at the bottom.</p>
<div class="space-bottom" style="width: 500px; height: 100px;">
  <div class="item"></div>
</div>
            
          
!
            
              .space-grid-row.my {
  --gap: 10px; /* The space between columns */
}

.space-grid-col.my {
  --gap: 30px; /* The space between rows */
}

.space-wrapping-row.my {
  --col-gap: 10px; /* The space between column */
  --row-gap: 30px; /* The space between rows */
}

.space-row-separator.my {
  --size: 30px; /* Height */
}

.space-col-separator.my {
  --size: 10px; /* Width */
}

/* Components created for demo purposes, not related to The Little Spacer framework: */

.item {
  z-index: 1;
  background-color: rgb(175, 252, 88);
  min-width: 100px;
  min-height: 50px;
  max-width: 100px;
  max-height: 50px;
  border: 1px dotted #74bd10;
  color: white;
}

.little-item {
  z-index: 2;
  background-color: rgb(249, 149, 53);
  min-width: 40px;
  min-height: 25px;
  max-width: 40px;
  max-height: 25px;
  border: 1px dotted #74bd10;
  color: white;
}


            
          
!
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