cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

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

            
          
!
            
              // 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…

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console