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 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.


                <div class="holder">
	<h2>Some Title</h2>
	<textarea cols="30" rows="1">This is a textarea
  Non eram nescius, Brute, cum, quae summis ingeniis exquisitaque doctrina philosophi Graeco sermone tractavissent, ea Latinis litteris mandaremus, fore ut hic noster labor in varias reprehensiones incurreret</textarea>
	<p>Some block here</p>


                .holder { border: dashed green 1px; }
.holder * { border: dashed red 1px; }

.holder {
  width: 20em;
  height: 20em;
  min-height: 200px;
  min-width: 200px;
  /* the magic happens hereunder*/
  resize: both;
  display: flex;
  flex-direction: column;
  overflow: hidden;

.holder textarea {
  flex: 1;
  resize: none;


The parent box is resizeable ("resize:both"). To allow this, one must disallow it to resize on its own due to inside content ("overflow: hidden"), so that the only way to resize it is by the user's action.

The textarea is on its own unresizeable ("resize:none"), but it is told to fit the parent box's ("flex: 1") size.

The parent box is flexible ("display: flex", or "display: inline-flex") and block elements inside it are placed under eachother ("flex-direction: cullum") as they would normally be).

One should also add a minimum sizes ("min-height", "min-width") to the parent box, to avoid it being shrunk too much and having some elements to be hidden (do not forget the "overflow: hidden").