Pen Settings

HTML

CSS

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

JavaScript

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

Packages

Add 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 or require. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Behavior

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.

            
              <div mv-app="readability" mv-bar="none">
	<div class="controls">
		<label>Line length: <input type="range" property="lineLength" max="150"></label>
		<label>Leading: <input type="range" property="lineHeight" min="0" max="2" step=".1"></label>
		<div class="grid">
			Alignment: 
			<div class="spread">
			<label><input type="radio" property="align" name="align" value="left" checked /> Left</label>
			<label><input type="radio" value="center" name="align" /> Center</label>
			<label><input type="radio" value="right" name="align" /> Right</label>
			<label><input type="radio" value="justify" name="align" /> Justify</label>
			</div>
		</div>
		<div>
			<label>
				<input type="checkbox" property="hyphenate" />
				Hyphenate?
			</label>
		</div>
		<label>
			Columns
			<input type="range" property="columns" value="1" max="10">
		</label>
		<style>
p {
	max-width: [lineLength]ch;
	line-height: [lineHeight]; 
	text-align: [align]; [if(hyphenate, 'hyphens: auto;')]
	[if(columns > 1, 'columns: ' & columns & ';')]
}
</style>
	</div>
	<p>One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. "What's happened to me?" he thought. It wasn't a dream. His room, a proper human room although a little too small, lay peacefully between its four familiar walls. A collection of textile samples lay spread out on the table - Samsa was a travelling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame. It showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer. Gregor then turned to look out the window at the dull weather. Drops of rain could be heard hitting the pane, which made him feel quite sad. "How about if I sleep a little bit longer and forget all this nonsense", he thought, but that was something he was unable to do because he was used to sleeping on his right, and in his present state couldn't get into that position. </p>
</div>
            
          
!
            
              body {
	padding: 1em;
}

[mv-app] {
	display: flex;
}

style {
	display: block;
	font: 100%/1.5 Consolas, Monaco, monospace;
	background: hsl(220, 20%, 90%);
	padding: .5em 1em;
	margin-top: 1em;
	white-space: pre;
	tab-size: 4;
	width: 25em;
}

.controls > * {
	display: block;
	margin: .5em 0;
}

.controls > label, .grid {
	display: grid;
	grid-template-columns: 7em 1fr;
}

.spread {
	display: flex;
	justify-content: space-between;
}

p {
	margin:0;
}

.controls {
	margin-right: 2em
}
            
          
!
999px

Console