cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

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.

            
              <div class="grid">
	<div class="grid__item grid__item--with-content">
		<h2>Here is a grid item with some content in</h2>
		<p>Using minmax(0, 1fr) the columns all collapse evenly</p>
	</div>
	<div class="grid__item"></div>
	<div class="grid__item"></div>
</div>

<div class="grid grid--auto">
	<div class="grid__item grid__item--with-content">
		<h2>Here is a grid item with some content in</h2>
		<p>Using minmax(auto, 1fr) this column will always be at least the width of the content</p>
	</div>
	<div class="grid__item"></div>
	<div class="grid__item"></div>
</div>
            
          
!
            
              * {
	box-sizing: border-box;
}

.grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-gap: 10px;
	margin: 3em auto;
	max-width: 800px;
}

.grid--auto {
	grid-template-columns: repeat(3, minmax(auto, 1fr));
}

.grid__item {
	height: 100%;
	min-height: 200px;
	background-color: #b87cd6;
	padding: 20px;
	
	> * {
		width: 200px;
		border: 1px dotted black;
	}
}

.grid__item--with-content {
	background-color: #e2a01b;
}


            
          
!
999px
Loading ..................

Console