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.


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.

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.


  <section class="grid">
    <section class="one">
      <p>Both rows will adjust to their content with "max-content"</p>
    <section class="two">
      <p>Columns have a min of...?</p>
    <section class="three">
      <p>This whole row...<br><br>The columns adjust because they use "fr".</p>
    <section class="four">
      <p>...doesn't adjust its height... forever stuck at "200px"<br><br>The font in all cells is measured with "rem" and adjusts to the screen size.</p>
    <section class="four">
      <p>lauren ipkiss</p>


                body {
  font-family: arial;
  padding: 1%;

/* grid container */
.grid {
  display: grid;
    /* rows: repeat(2) */
    repeat(2, minmax(.12rem, max-content)) 
    / /* <- this slash divides rows and cols*/
    /* columns: left right */
    minmax(20%, 1fr) minmax(200px, 3fr);
  gap: .01rem;
  font-size: .02rem;

/* apply to all grid items */
.grid * {
  padding: calc( 1rem / 100); /* .01rem */

/* individual elements */
.one {
  background: #9966ff;
  border: 1px solid black;
.two {
  background: #6666ff;
  border: 1px solid black;
.three {
  background: #6699ff;
  border: 1px solid black; 
.four {
  background: #66ff99;
  border: 1px solid black;


                (function(doc, win) {
  var docEl = doc.documentElement,
    recalc = function() {
      var clientWidth = docEl.clientWidth;
      if (!clientWidth) return; = clientWidth + "px"; = "none";
      docEl.clientWidth; // Force relayout - important to new Androids = "";

  // Abort if browser does not support addEventListener
  if (!doc.addEventListener) return;

  // Test rem support
  var div = doc.createElement("div");
  div.setAttribute("style", "font-size: 1rem");

  // Abort if browser does not recognize rem
  if ( != "1rem") return;

  win.addEventListener("resize", recalc, false);
  doc.addEventListener("DOMContentLoaded", recalc, false);
})(document, window);