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

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

              
                .warning
	p Subgrid support required to get the most out of this pen

.wrapper
	main
		.card
			h2 Standard card
			img(src="https://images.unsplash.com/photo-1570727624862-3008fe67a6be?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=400&fit=max&ixid=eyJhcHBfaWQiOjE0NTg5fQ" alt="pink donut with sprinkles")
			p Pastry sugar croissant jelly sugar sprinkles. Sprinkles sweet apple lollipop tiramisu sprinkles. Dolor croissant vanilla donut vanilla donut. Sugar lollipop lollipop sugar ipsum orange.
		.card
			h2 Card title that's longer than others
			img(src="https://images.unsplash.com/photo-1506224772180-d75b3efbe9be?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=400&fit=max&ixid=eyJhcHBfaWQiOjE0NTg5fQ" alt="three donuts, pink, blue and chocolate, all with sprinkles")
			p Pastry donut pastry sweet sweet vanilla sweet sugar donut orange. Jelly cream cookie biscuit pastry lollipop sugar jelly candy ipsum. Cookie ipsum sugar lollipop vanilla lollipop tiramisu vanilla sugar ipsum. Dolor orange donut apple apple jelly apple jelly sweet muffin.
		.card
			h2 Card with long body
			img(src="https://images.unsplash.com/photo-1527515545081-5db817172677?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=400&fit=max&ixid=eyJhcHBfaWQiOjE0NTg5fQ" alt="Pile of different flavoured donuts including cinamon, chocolate, custard, jam and more!")
			p Dolor cake biscuit sweet jelly biscuit cake dolor sweet tiramisu orange dolor cake marzipan pastry marzipan cookie lollipop apple sweet. Dolor ipsum orange donut cream cream ipsum croissant muffin candy vanilla sweet marzipan muffin sprinkles orange vanilla orange orange orange. Croissant biscuit sweet jelly dolor sprinkles sugar croissant jelly marzipan candy cake cookie croissant pastry croissant marzipan ipsum sprinkles sweet. 

              
            
!

CSS

              
                main {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(3, auto);
	gap: 1rem;
}

.card {
	display: grid;
	grid-row: 1 / -1;
	grid-template-rows: subgrid;
	// gap: 0;
}

// Visual styling
.wrapper {
	width: 1000px;
	margin: 1rem auto;
}

body {
	background-color: #9575CD;
}

.card {
	background-color: white;
	border-radius: 10px;
	// 	https://tobiasahlin.com/blog/layered-smooth-box-shadows/
	box-shadow: 0 2px 1px rgba(0,0,0,0.09), 
              0 4px 2px rgba(0,0,0,0.09), 
              0 8px 4px rgba(0,0,0,0.09), 
              0 16px 8px rgba(0,0,0,0.09),
              0 32px 16px rgba(0,0,0,0.09);
	
	h2 {
		padding: 1rem 1rem 0;
		margin: 0;
		font-weight: 500;
	}
	
	img {
		width: 100%;
		height: auto;
	}
	
	p {
		line-height: 1.5;
		padding: 0 1rem;
		margin: 0 0 1rem;
	}
}

.warning {
	width: 80%;
	padding: 0.5rem;
	margin: 1rem auto;
	background-color: #fed7d7;
	border: 1px solid #f56565;
	border-radius: 10px;
	color: #f56565;
}

@supports (grid-template-rows: subgrid) {
  .warning {
    display: none;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console