Pen Settings



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


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.


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.


                <main class="🐛">
		<h1>It’s a <span>feature</span>, not a 🐛</h1>
		<p class="intro">This demo is Media Query-free!</p>

	<ul class="gallery">
		<li><h2 class="🐜-title">Dragonfly</h2></li>
		<li><h2 class="🐜-title">Bug</h2></li>
		<li><h2 class="🐜-title">Beetle</h2></li>
		<li><h2 class="🐜-title">Bee</h2>
		<li><h2 class="🐜-title">Grasshopper</h2></li>
		<li><h2 class="🐜-title">Monarch</h2></li>
		<li><h2 class="🐜-title">Fly</h2></li>
		<li><h2 class="🐜-title">Ladybug</h2></li>
		<li class="featured"><h2 class="🐜-title">Dragon fly</h2></li>
		<li><h2 class="🐜-title">Fake Ladybug</h2></li>
		<li><h2 class="🐜-title">Amazing-Looking Bug</h2></li>
		<li class="mantis"><h2 class="🐜-title">Praying Mantis</h2></li>
		<li><h2 class="🐜-title">Bee</h2></li>
		<li><h2 class="🐜-title">Grasshopper</h2></li>
		<li><h2 class="🐜-title">Butterfly or Moth</h2></li>
		<li><h2 class="🐜-title">Beetle</h2></li>
		<li><h2 class="🐜-title">Catepillar</h2></li>
		<li><h2 class="🐜-title">Ladybug</h2></li>


                .gallery {
	// Flexbox Default/Fallback - does not produce 100% matching result 
	display: flex;
	flex-wrap: wrap;
	// Use Grid if browser supports it
	display: grid;
	grid-gap: 0.2rem;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	grid-auto-rows: minmax(20vh, 200px);
  // play with values here:
	// grid-auto-rows: minmax(0, 1fr);
  // grid-auto-rows: minmax(0, 1fr);
  //	grid-auto-flow: dense;

	// flexbox fallback	
	li {		
		flex: 0 0 auto;
		flex-wrap: wrap;
		height: 20vh;
		margin: .12rem;
		min-width: 15rem;
		width: 20rem;

		@supports ( display: grid ) {
			//unset the propertied used for flexbox fallback
			height: initial;
			margin: unset;
			width: initial;
			min-width: initial;
			&:nth-of-type(2n + 2) {
				grid-row: span 2;

// Styles for fun
// -------------------------------------------------

@import ',700';

body {
	background: hsl(260, 20%, 20%);
	color: #fff;
	font-family: 'Work Sans', sans-serif;
	font-weight: 300;
	letter-spacing: .03rem;
	line-height: 1;
	margin: 1rem;	
p {
	font-size: .875rem;
	line-height: 1.5;

@mixin bg( $count ) {
	$path: '//';
	$ext: '.jpg';
	@for $i from 1 through $count {
	 $fullpath: #{$path}-#{$i}#{$ext};
		li:nth-of-type(#{$i}) {
		  background-image: url($fullpath); 

@include bg(18);

ul, li {
	list-style: none;
	padding-left: 0;		

li {
	align-items: stretch;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	display: flex;
	flex: 1 0 100%;
	flex-direction: column;
	justify-content: flex-end;
	line-height: 3;
	overflow: hidden;

	&:focus {
		.🐜-title {
			background-color: hsla(220, 90%, 15%, 1);
			height: auto;
			padding-top: 1rem;
			padding-bottom: 1rem;
			transform: translateY(0);

.🐜-title {
	background-color: hsla(220, 90%, 15%, .5);
	color: #fff;
	font-size: 0.8rem;
	line-height: 1.5;
	margin: 0;
	padding: 0.25rem 0.5rem;
	transform: translateY(100px);
	transition: padding .3s ease-in-out, background-color .3s ease-in-out, transform .3s ease-in-out;

h1 {
	font-size: calc(3rem + 1vw);
	font-weight: 300;
	margin: 2rem 0 0;	
	text-align: center;
	span {
		font-weight: 700;

.intro {
	text-align: center;