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.

            
              .grid-wrapper
	.grid
		- var i = 0;
		while i < 6
			- i++
			.grid-cell
				.grid-cell-inner

            
          
!
            
              html {
  box-sizing: border-box;
}
*, *::before, *::after {
  box-sizing: inherit;
}

.grid-wrapper {
	/* Prevents odd margin behaviour in Chrome */
	// overflow: hidden;
	padding: 1px 0;
}

.grid {
  /* forces equal cell heights */
  display: flex;
  flex-wrap: wrap;

  /* creates gaps */
  padding: 20px 0 0 20px;

	/* pulls grid cells hard against edges */
	margin: -20px;
}

.grid-cell {
  /* sets column count */
  width: calc(100% / 1); /* 1 columns */

  /* creates gaps */
  border: 0 solid transparent;
  border-width: 0 20px 20px 0;
	
  /* prevents background bleed */
  background-clip: padding-box;

  /* forces inner to take up full grid cell height */
  display: flex;
}

@media (min-width: 400px){
	.grid-cell {
    width: calc(100% / 2); /* 2 columns */
	}
}

@media (min-width: 600px){
	.grid-cell {
    width: calc(100% / 3); /* 3 columns */
	}
}

.grid-cell-inner {
	width: 100%;
}


/************************************\
  Prettiness only below this point
\************************************/

.grid-cell-inner {
	box-shadow: 0 0 10px 3px blue;
}

.grid-cell {
	/* So that we can see the grid cells */
	box-shadow: inset 0 0 0 1px #000;
	height: 100px;
}

.grid-wrapper {
	/* So that we can see the edges of the grid */
	// border: 3px solid green;
}

.grid-wrapper {
	max-width: 500px;
	margin: 30px auto;
}

html {
  margin: 20px;
}
            
          
!
999px
Loading ..................

Console