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


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.


<h5>Input desired image resolution.
  <input type="number" class="inputs" id="hor" value='500' min="200"> 
<input type="number" class="inputs" id="vert" value='300' min="200">

<button onclick="openWin()">Create window</button>


                body {
  color: white;
  text-align: center;
  font-family: roboto, sans-serif;
  linear-gradient(27deg, #151515 5px,       transparent 5px) 0 5px,
  linear-gradient(207deg, #151515 5px,       transparent 5px) 10px 0px,
  linear-gradient(27deg, #222 5px,           transparent 5px) 0px 10px,
  linear-gradient(207deg, #222 5px,         transparent 5px) 10px 5px,
  linear-gradient(90deg, #1b1b1b 10px,       transparent 10px),
  linear-gradient(#1d1d1d 25%, #1a1a1a       25%, #1a1a1a 50%, transparent 50%,         transparent 75%, #242424 75%, #242424);
  background-color: #131313;
  background-size: 20px 20px;

h1 {
  font-family: roboto, sans-serif;
  padding: 50px;

h5 {
  font-size: 20px;

button {
  background-color: green;
  color: white;

.inputs {
  background-color: white;


                var newWindow;

function openWin() {
    newWindow ="", "_blank", "width=100, height=100,\
    location=no, menubar=no, status=no, titlebar=no"); 

function resizeWin() {
    var horInput = document.getElementById("hor");
    var vertInput = document.getElementById("vert");
    var focWind = newWindow.document;
    newWindow.resizeTo(parseFloat(horInput.value - (-17)), parseFloat(vertInput.value - (-68)));
    focWind.write("<style>body {background-color: gray; background-image: repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.5) 35px, rgba(255,255,255,.5) 70px); text-align: center; font-family: roboto, sans-serif; font-size: 1.3em; font-weight: bold; padding: 50px;}<\/style>Image size: " + horInput.value + "px x " + vertInput.value + "px <br> ");
    focWind.write("(Does not include window frame.)");