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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              a.download-button(href="//github.com/chrisdothtml/LightGrid",target="_blank")
	i.fa.fa-download
	|  Download

.demo
	.container
		h1 Demo One
		p Three columns on Desktop, six on Tablet, break after Tablet

	.container.colored
		- for (var i = 0; i < 4; i++)
			.col.col3-desktop.col6-tablet: span= ".col3-desktop .col6-tablet"

	.container
		h2 Code:
		.code-block
			span &lt;div class="row"&gt;
			- for (var i = 0; i < 4; i++)
				span &nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="col3-desktop col6-tablet"&gt;&lt;/div&gt;
			span &lt;/div&gt;

hr

.demo
	.container
		h1 Demo Two
		p Eight columns and four columns, break after Tablet

	.container.colored
		.col.col8-tablet: span= ".col8-tablet"
		.col.col4-tablet: span= ".col4-tablet"

	.container
		h2 Code:
		.code-block
			span &lt;div class="row"&gt;
			span &nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="col8-tablet"&gt;&lt;/div&gt;
			span &nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="col4-tablet"&gt;&lt;/div&gt;
			span &lt;/div&gt;

hr

.demo
	.container
		h1 Demo Three
		p Six columns on Desktop, three on Tablet, six on Mobile

	.container.colored
		.row
			- for (var i = 0; i < 2; i++)
				.col.col6-desktop.col3-tablet.col6-mobile: span= ".col6-desktop .col3-tablet .col6-mobile"

	.container
		h2 Code:
		.code-block
			span &lt;div class="row"&gt;
			- for (var i = 0; i < 2; i++)
				span &nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="col6-desktop col3-tablet col6-mobile"&gt;&lt;/div&gt;
			span &lt;/div&gt;

hr

.demo
	.container
		h1 Demo Four
		p Five columns and seven columns, no break

	.container.colored
		.col.col5: span= ".col5"
		.col.col7: span= ".col7"

	.container
		h2 Code:
		.code-block
			span &lt;div class="row"&gt;
			span &nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="col5"&gt;&lt;/div&gt;
			span &nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="col7"&gt;&lt;/div&gt;
			span &lt;/div&gt;

hr

.demo
	.container
		h1 Demo Five
		p Left and Right

	.container.colored
		.row
			.col.col4.left2: span= ".col4 .left2"
			.col.col6: span= ".col6"
		.row
			.col.col3-tablet.left3-tablet.right3-tablet: span= ".col3-tablet .left3-tablet .right3-tablet"
			.col.col3-tablet: span= ".col3-tablet"

	.container
		h2 Code:
		.code-block
			span &lt;div class="row"&gt;
			span &nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="col4 left2"&gt;&lt;/div&gt;
			span &nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="col6"&gt;&lt;/div&gt;
			span &lt;/div&gt;
			span &lt;div class="row"&gt;
			span &nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="col3-tablet left3-tablet right3-tablet"&gt;&lt;/div&gt;
			span &nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="col3-tablet"&gt;&lt;/div&gt;
			span &lt;/div&gt;

hr

.demo
	.container
		h1 Demo Six
		p Shows and Hides

	.container.colored
		.col.show-desktop.red: span= ".show-desktop"
		.col.hide-mobile.green: span= ".hide-mobile"
		.col.hide-tablet.blue: span= ".hide-tablet"

	.container
		h2 Code:
		.code-block
			span &lt;div class="show-desktop"&gt;&lt;/div&gt;
			span &lt;div class="hide-mobile"&gt;&lt;/div&gt;
			span &lt;div class="hide-tablet"&gt;&lt;/div&gt;

a.download-button(href="//github.com/chrisdothtml/LightGrid",target="_blank")
	i.fa.fa-download
	|  Download
            
          
!
            
              // NOTICE: The styles in here are for the demo. To download the grid, please click the download button

body {
	font-family: "Open Sans", sans-serif;
	color: #9a9a9a;
}

.download-button {
	display: block;
	background-color: #85c99e;
	width: 100%;
	max-width: 200px;
	height: 50px;
	margin: 40px auto;
	color: #fff;
	text-align: center;
	line-height: 50px;
	border-radius: 5px;
	text-decoration: none;
	transition: all 0.3s;

	&:hover {
		opacity: .8;
	}
}

hr {
	background-color: #ebebeb;
	height: 1px;
	margin: 50px 0;
	border: 0;
}

h1, h2 {
	font-weight: normal;
}

h1 {
	font-size: 29px;
	line-height: 25px;
}

p {
	margin-top: 5px;
	font-size: 15px;
	line-height: 15px;
}

h2 {
	margin-top: 15px;
	font-size: 16px;
	line-height: 16px;
}

.code-block {
	background-color: #f7f7f9;
	margin-top: 10px;
	padding: 9px 14px;
	font-size: 14px;
	border: 1px solid #e1e1e8;
	border-radius: 3px;

	span {
		display: block;
		margin-top: 10px;

		&.indent {
			padding-left: 10px;
		}
	}
}

.container.colored {
	background-color: #f0f0f0;
	margin-top: 15px !important;
	padding: 15px;
}

.col {
	padding-top: 5px;
	padding-bottom: 5px;
	float: left;

	span {
		display: block;
		background-color: #fff;
		padding: 0 3px;
		font-size: 14px;
		text-align: center;
		line-height: 45px;
		white-space: nowrap;
		text-overflow: clip;
		overflow: hidden;
		border-radius: 3px;
	}
}

.show-desktop,
.hide-mobile,
.hide-tablet {
	width: 100%;
	padding-left: 5px;
	padding-right: 5px;
	float: left;
}

.red span {
	background-color: #d65151;
	color: #fff;
}

.green span {
	background-color: #85c99e;
	color: #fff;
}

.blue span {
	background-color: #0072bc;
	color: #fff;
}
            
          
!
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.

Console