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.




                //  Play around with what happens if you toggle the layout between sparse and dense.

ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px,1fr));
  grid-auto-rows: 1fr;
  grid-gap: 1rem;
// grid-auto-flow: dense;


  grid-column: span 3;
li:nth-child(8) {
  grid-row: span 5;
li:nth-child(9) {
  grid-row: span 3;
  grid-column: span 2;

// Additional Visual Styling
body {
  background: #F6F3EA
ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: white;
  font-family: Avenir, Heveltica, Arial, san-serif;
  font-weight: bold;
  font-size: 1.2rem;
li {
  padding: 1em;
  background: #F9423A;




See what happens when you add:

ul {
  grid-auto-flow: dense;

You can simply uncomment the CSS on line 8. Try it at different  viewport widths, or by changing the size of your boxes, the size of your track sizes, and the size of your gap.