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

Packages

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.

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.

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.

HTML

              
                h1 Multi-line lists with item separators (CSS)

h2 Pipe spacing is variable:
ul.flexy
	li.food Blueberry donut
	li.food Raspberry donut pudding
	li.food Banana pie pudding donut
	li.food Grape
	li.food Blackberry sundae

h2 Hacky, but pipe spacing is fixed:
div.fixie
	div.food Blueberry donut
	span.separator[aria-hidden] |
	div.food Raspberry donut pudding
	span.separator[aria-hidden] |
	div.food Banana pie pudding donut

aside
	| (I mean, it's all pretty hacky honestly…)

              
            
!

CSS

              
                // This stuff doesn't matter...
html
	display: flex
	height: 100%
	width: 100%

body
	margin: auto
	width: 60%

h1, h2
	margin: 1em 0 0.5em

ul, li
	margin: 0
	padding: 0
	list-style: none

aside
	font-size: 0.6em
	margin-top: 10em
	text-align: right

// This stuff matters more!
.flexy
	display: flex
	flex-wrap: wrap
	margin-left: -12px
	overflow: hidden

	.food
		flex-grow: 1
		margin: 6px 0
		margin-left: 12px
		position: relative
		text-align: center

		&::after
			content: '|'
			position: absolute
			right: -6px
			top: 0
			transform: translate(50%, 1px)

.fixie
	text-align: center
	position: relative

	.food, .separator
		display: inline-block

	.food
		padding: 0 10px

	@for $i from 1 through 3
		span:nth-of-type(#{$i})
			// `em`s aren't perfect for this, so we add a font-specific fudge factor.
			height: calc(#{4 - $i} * 1.1em - 100%) // Bleh…
			overflow: hidden
			position: absolute
			transform: translate(-3px, 1px)  // Bleh…

              
            
!

JS

              
                
              
            
!
999px

Console