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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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
		.grid-cell
		.grid-cell
		.grid-cell
		.grid-cell
		.grid-cell
		.grid-cell

            
          
!
            
              /* Allows the use of px units on borders */
html {
  box-sizing: border-box;
}
*, *::before, *::after {
  box-sizing: inherit;
}

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

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

  /* creates an equal outer gap (optional) */
  padding: 20px 0 0 20px;

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

	/* Alternate margin if not including padding */
  // margin: 0 -20px -20px 0;
}

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

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

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

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


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

.grid-cell {
	/* So that we can see the grid cells */
	box-shadow: inset 0 0 0 1px #000;
	height: 100px;
	
	/* For displaying the color coding */
	// outline: 2px dashed yellow;
	// border-color: hsla(0, 100%, 35%, 1);

	&:nth-child(1){
		background-color: hotpink;
	}
}

.grid {
	/* For displaying the color coding */
	// padding: 0;
	// border: 0 solid hsla(210, 100%, 50%, 1);
	// border-width: 20px 0 0 20px;
}

.grid-wrapper {
	/* So that we can see the edges of the grid */
	box-shadow: 0 0 10px 2px green;

	max-width: 500px;
	margin: 30px auto;
}

html {
	margin: 20px;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console