Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                -
	const user = {
		name: 'Bart Veneman',
		username: 'bartveneman',
		gravatar: 'https://gravatar.com/avatar/56d18ba2b0bf189436499b0f215b5e29?s=100'
	}

.user-profile
	.profile-card
		h1.profile-card__title= user.name
		p.profile-card__subtitle= user.username
		img.profile-card__avatar(src=user.gravatar alt=`Avatar for ${user.name}`)
	
	.profile-projects
		h2 #{user.name}'s projects
		ol.cards
			for item in ["Mobile Twitter","CodePen.io","CodePen Pen Page","Tweakers.net","NU.nl","Blendle","Adwise.nl","Catawiki","LEGO.com","Trello","Marktplaats","Schiphol","Facebook.com","NOS.nl","Twitter","GitHub","Beslist.nl","Project Wallace","CSS Tricks","Syntax.fm","Wikipedia.org","The Guardian","Stackoverflow.com","Amazon.com","Smashing Magazine","GitLab","Coolblue","Bitbucket.org","NRC","Level Up Tutorials","ShopTalkShow","Wes Bos.com","Bol.com","Centraal Beheer","Slack.com","BBC iPlayer","TechCrunch Beta","Empty state", "Very long ttitle that wraps on new lines"]
				li
					a.card(href='')
						h4.card__title= item
						p.card__meta Updated
							time 4 hours ago
					
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css?family=Teko:500")
	
black-hue = 253
black-saturation = 8

black = hsl(black-hue, black-saturation, 2)
coal = hsl(black-hue, black-saturation, 12)
darkgrey = hsl(black-hue, black-saturation, 15)
grey = hsl(black-hue, black-saturation, 21)
silver = hsl(black-hue, black-saturation, 40)
gainsboro = hsl(black-hue, black-saturation, 60)
whitesmoke = hsl(black-hue, black-saturation, 82)
white = hsl(black-hue, black-saturation, 92)
	
purple = hsl(291, 100, 45)
pink = hsl(335.9, 89%, 46.5%)
red = hsl(0, 80, 51)
orangered = hsl(4, 66, 51)
orange = hsl(35.9, 89%, 46.5%)
gold = hsl(42, 100, 55)
yellow = hsl(yellow)
green = hsl(95.8, 89.9%, 46.5%)
blue = hsl(215.9, 89%, 46.5%)
turquoise = hsl(155.8, 89.9%, 46.5%)

brand-type =
	font-family 'Teko'
	font-weight 500
	font-style normal
	text-decoration none
	letter-spacing .04em
	line-height 1
	text-transform uppercase
	
html
	background-color coal
	color whitesmoke
	font-family sans-serif
	
body
	margin 0
	
.profile-card
	background-color white
	color black
	padding 15vmin 20vmin
	text-align center
	background linear-gradient(45deg, white calc(100% - 300px), #fff calc(100% - 300px), #fff calc(100% - 296px), turquoise calc(100% - 296px))
	@media (min-width 800px)
		padding-bottom 25vmin
	&__title
		{brand-type}
		margin 0
		font-size calc(28px + 8vmin)
	&__subtitle
		margin 0
		color silver
		font-size 18px
		margin-bottom 96px
		&::before
			content '@'
	&__avatar
		display inline-block
		margin 0
		border-radius 50%
		border 4px solid #fff
		width 100px
		height 100px
		
// PROJECTS
.profile-projects
	h2
		display none
		
.cards
	padding 0 20px
	list-style none
	max-width 1200px
	margin 20px auto
	display grid
	grid-template-columns repeat(auto-fit, minmax(24ch, 1fr))
	grid-gap 20px
	
	@media (min-width 800px)
		margin-top -15vmin
		grid-template-columns repeat(auto-fit, minmax(28ch, 1fr))
	
.card
	display flex
	flex-direction column
	color inherit
	background-color #fff
	color coal
	text-decoration none
	padding 20px
	height 8em
	box-shadow 0 2px 4px rgba(coal, .2)
	&:hover
		background-color white
	&:focus
		outline 2px solid blue
	&:hover,
	&:focus
		box-shadow 0 2px 2px rgba(coal, .5)
		
.card__title
	font-size 18px
	margin 0
	
.card__meta
	margin auto 0 0 0
	color gainsboro
              
            
!

JS

              
                
              
            
!
999px

Console