123

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.

            
              <h1>Under-Engineered Text Boxen</h1>

<form action="#" autocomplete="off" method="get" novalidate>
  <fieldset>
    <legend>Assorted Fields</legend>
    <div>
      <label for="blather">Text area:</label>
      <textarea id="blather" cols="20" rows="4">Lorem ipsum dolor sit amet.</textarea>
    </div>

    <div>
      <label for="name">Text Input:</label>
      <input type="text" id="name" value="Frank">
    </div>

    <div>
      <label for="berries">Datalist:</label>
      <input id="berries" type="text" list="berrylist" value="">
      <datalist id="berrylist">
        <option value="Blackberry">
        <option value="Blueberry">
        <option value="Boysenberry">
        <option value="Chuckberry">
        <option value="Cloudberry">
        <option value="Cranberry">
        <option value="Dewberry">
        <option value="Elderberry">
        <option value="Gooseberry">
        <option value="Huckleberry, I’ll be your">
        <option value="Lingonberry">
        <option value="Loganberry">
        <option value="Marionberry">
        <option value="Mulberry">
        <option value="Raspberry">
        <option value="Snozzberry">
        <option value="Strawberry">
        <option value="Thimbleberry">
        <option value="Wolfberry">
        <option value="Youngberry">
      </datalist>
    </div>
  </fieldset>
  
  <fieldset>
    <legend>Fields with Attributes</legend>
    <div>
      <label for="name-readonly">Read-only Text Input:</label>
      <input type="text" id="name-readonly" value="Phrank" readonly>
    </div>

    <div>
      <label for="name-required">Required Text Input:</label>
      <input type="text" id="name-required" value="" required>
    </div>

    <div>
      <label for="name-error">Errored Text Input:</label>
      <input type="text" id="name-error" value="Ed" aria-invalid="true">
    </div>

    <div>
      <label for="name-required-error">Errored Required Text Input:</label>
      <input type="text" id="name-required-error" value="" required aria-invalid="true">
    </div>
  </fieldset>
  
  <fieldset>
    <legend>Disabled Fields</legend>
    <div>
      <label for="mumble">Mumble:</label>
      <textarea id="mumble" cols="20" rows="4" disabled aria-disabled="true">Lorem ipsum dolor sit amet.</textarea>
    </div>

    <div>
      <label for="name2">Assigned Name:</label>
      <input type="text" id="name2" value="Still Frank" disabled aria-disabled="true">
    </div>
  </fieldset>
  
  <fieldset dir="rtl" lang="iw">
    <legend>שדות שונים</legend>
    <div>
      <label for="RTLblather">לקשט:</label>
      <textarea id="RTLblather" cols="20" rows="4">Lorem ipsum dolor לשבת אמט.</textarea>
    </div>

    <div>
      <label for="RTLname">שם פרטי:</label>
      <input type="text" id="RTLname" value="Frank" aria-invalid="true">
    </div>

    <div>
      <label for="RTLberries">ברי?</label>
      <input id="RTLberries" type="text" list="RTLberrylist" value="">
      <datalist id="RTLberrylist">
        <option value="Blackberry">
        <option value="Blueberry">
        <option value="Boysenberry">
        <option value="Chuckberry">
        <option value="Cloudberry">
        <option value="Cranberry">
        <option value="Dewberry">
        <option value="Elderberry">
        <option value="Gooseberry">
        <option value="Huckleberry, I’ll be your">
        <option value="Lingonberry">
        <option value="Loganberry">
        <option value="Marionberry">
        <option value="Mulberry">
        <option value="Raspberry">
        <option value="Snozzberry">
        <option value="Strawberry">
        <option value="Thimbleberry">
        <option value="Wolfberry">
        <option value="Youngberry">
      </datalist>
    </div>

    <div>
      <label for="RTLname-required">נדרש:</label>
      <input type="text" id="RTLname-required" value="" required>
    </div>
  </fieldset>
  
  <fieldset>
    <legend>Assorted Inputs</legend>
    <details>
      <summary>Show them all</summary>
      <div>
        <input type="button" value="button">
      </div>
      <div>
        <input type="checkbox" value="checkbox">
      </div>
      <div>
        <input type="color" value="color">
      </div>
      <div>
        <input type="date" value="date">
      </div>
      <div>
        <input type="datetime-local" value="datetime-local">
      </div>
      <div>
        <input type="email" value="email">
      </div>
      <div>
        <input type="file" value="file">
      </div>
      <div>
        <input type="hidden" value="hidden">
      </div>
      <div>
        <input type="image" value="image">
      </div>
      <div>
        <input type="month" value="month">
      </div>
      <div>
        <input type="number" value="number">
      </div>
      <div>
        <input type="password" value="password">
      </div>
      <div>
        <input type="radio" value="radio">
      </div>
      <div>
        <input type="range" value="range">
      </div>
      <div>
        <input type="reset" value="reset">
      </div>
      <div>
        <input type="search" value="search">
      </div>
      <div>
        <input type="submit" value="submit">
      </div>
      <div>
        <input type="tel" value="tel">
      </div>
      <div>
        <input type="text" value="text">
      </div>
      <div>
        <input type="time" value="time">
      </div>
      <div>
        <input type="url" value="url">
      </div>
      <div>
        <input type="week" value="week">
      </div>
      <div>
        <input type="datetime" value="datetime">
      </div>
    </details>
  </fieldset>
</form>
            
          
!
            
              body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.4;
/*     line-height: 1.5; */
/*     letter-spacing: 0.12em; */
/*     word-spacing: 0.16em; */
/*     font-size: 200%; */
}

@media print {
  body {
    font-size: 8pt;
  }
}

/*-- forms --*/

form {
  background-color: #fff;
  padding: 0.5em 1em;
  display: grid;
  grid-template-columns: repeat(2, [col] 1fr );
}

fieldset {
  padding: 0 1em;
  margin: 0 0.5em 1em 0.5em;
}

fieldset:last-child {
  grid-column: span 2;
}

form details div {
  display: inline-block;
  margin: .25em;
}

details {
  margin: 1em 0;
}

summary {
  margin-bottom: 1em;
}

form div {
  box-sizing: border-box;
  margin: 1em 0;
}

label {
  display: block;
  margin: 0.25em 0;
}

/* Text fields */

textarea,
input:not([type="checkbox"]):not([type="file"]):not([type="image"]):not([type="radio"]):not([type="range"]) {
  font: inherit;
  letter-spacing: inherit;
  word-spacing: inherit;
  border: 0.1em solid;
  padding: 0 0.2em;
}

/* Focus */

textarea:focus,
input:not([type="checkbox"]):not([type="file"]):not([type="image"]):not([type="radio"]):not([type="range"]):focus {
  outline: 0.15em solid #00f;
  box-shadow: 0 0 0.2em #00f;
}

/* Read-only */

textarea[readonly],
input:not([type="checkbox"]):not([type="file"]):not([type="image"]):not([type="radio"]):not([type="range"])[readonly] {
  border-color: rgba(0, 0, 0, 0.42);
  border-left: none;
  border-top: none;
  border-right: none;
}

/* Errored */

textarea[aria-invalid="true"],
textarea[aria-invalid="spelling"],
textarea[aria-invalid="grammar"],
input:not([type="checkbox"]):not([type="file"]):not([type="image"]):not([type="radio"]):not([type="range"])[aria-invalid] {
  background: linear-gradient(135deg, rgba(255,0,0,1) 0, rgba(255,0,0,1) .4em, rgba(255,255,255,1) .4em);
}

/* RTL Errored */

*[dir="rtl"] textarea[aria-invalid="true"],
*[dir="rtl"] textarea[aria-invalid="spelling"],
*[dir="rtl"] textarea[aria-invalid="grammar"],
*[dir="rtl"] input:not([type="checkbox"]):not([type="file"]):not([type="image"]):not([type="radio"]):not([type="range"])[aria-invalid] {
  background: linear-gradient(225deg, rgba(255,0,0,1) 0, rgba(255,0,0,1) .4em, rgba(255,255,255,1) .4em);
}

/* Required */

textarea[required],
input:not([type="checkbox"]):not([type="file"]):not([type="image"]):not([type="radio"]):not([type="range"])[required] {
  border-left-width: 0.3em;
}

/* RTL Required */

*[dir="rtl"] textarea[required],
*[dir="rtl"] input:not([type="checkbox"]):not([type="file"]):not([type="image"]):not([type="radio"]):not([type="range"])[required] {
  border-left-width: 0.1em;
  border-right-width: 0.3em;
}

/* Dark mode */

@media screen and (prefers-color-scheme: dark) {
  form {
    background-color: #000;
    color: #fff;
  }
  textarea,
  input:not([type="checkbox"]):not([type="file"]):not([type="image"]):not([type="radio"]):not([type="range"]) {
    background-color: transparent;
    color: inherit;
    border-color: #ccc;
  }
  textarea:focus,
  input:not([type="checkbox"]):not([type="file"]):not([type="image"]):not([type="radio"]):not([type="range"]):focus {
    outline-color: #0ff;
    box-shadow: 0 0 0.2em #0ff;
  }
  textarea:disabled,
  input:not([type="checkbox"]):not([type="file"]):not([type="image"]):not([type="radio"]):not([type="range"]):disabled {
    border-color: rgba(255,255,255,.3);
    color: rgba(255,255,255,.3);
    background-color: rgba(255,255,255,.1);
  }
  textarea[readonly],
  input:not([type="checkbox"]):not([type="file"]):not([type="image"]):not([type="radio"]):not([type="range"])[readonly] {
    border-color: #777;
  }
  textarea[aria-invalid],
  input:not([type="checkbox"]):not([type="file"]):not([type="image"]):not([type="radio"]):not([type="range"])[aria-invalid] {
    background: linear-gradient(135deg, rgba(238,0,0,1) 0, rgba(238,0,0,1) .3em, rgba(0,0,0,0) .3em);
  }
  *[dir="rtl"] textarea[aria-invalid],
  *[dir="rtl"] input:not([type="checkbox"]):not([type="file"]):not([type="image"]):not([type="radio"]):not([type="range"])[aria-invalid] {
    background: linear-gradient(225deg, rgba(238,0,0,1) 0, rgba(238,0,0,1) .3em, rgba(0,0,0,0) .3em);
  }
}
            
          
!
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