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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.

HTML

            
              <!-- demo stuff -->
<div class="site-header">
	<h1>Responsive CSS grids explained: Creating a grid from scratch</h1>
	<p class="subheading"><a href="https://codetheweb.com/responsive-css-grids-explained-creating-grids-from-scratch/">Read the full article &#64; codetheweb.com</a></p>
</div>
<!-- /demo stuff -->
<div class="grid">
	<div class="col-1-1 col-1-2-xs col-1-2-sm col-1-1-md col-1-2-lg">
		<div class="module">content 1</div>
	</div>
	<div class="col-1-1 col-1-2-xs col-1-2-sm col-1-2-md col-1-4-lg">
		<div class="module">content 2</div>
	</div>
	<div class="col-1-1 col-1-1-sm col-1-2-md col-1-4-lg">
		<div class="module">content 3</div>
	</div>
	<div class="col-1-1 col-1-2-sm col-1-3-md col-1-4-lg">
		<div class="module">content 4</div>
	</div>
	<div class="col-1-1 col-1-2-sm col-1-3-md col-1-4-lg">
		<div class="module">content 5</div>
	</div>
	<div class="col-1-1 col-1-1-sm col-1-3-md col-1-2-lg">
		<div class="module">content 6</div>
	</div>
	<div class="col-1-1 col-1-3-sm col-1-3-md col-1-1-lg">
		<div class="module">content 7</div>
	</div>
	<div class="col-1-1 col-1-3-sm col-2-3-md col-1-3-lg">
		<div class="module">content 8</div>
	</div>
	<div class="col-1-1 col-1-3-sm col-1-3-md col-1-3-lg">
		<div class="module">content 9</div>
	</div>
	<div class="col-1-1 col-2-3-sm col-2-3-md col-1-3-lg">
		<div class="module">content 10</div>
	</div>
	<div class="col-1-1 col-1-3-sm col-2-3-md col-1-3-lg">
		<div class="module">content 11</div>
	</div>
	<div class="col-1-1 col-1-1-sm col-1-3-md col-2-3-lg">
		<div class="module">content 12</div>
	</div>
</div>
            
          
!

CSS

            
              /**
 * Box sizing setup
 */

html {
	box-sizing: border-box;
}

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

/**
 * Grid
 */

$grid-gutter: 10px;

.grid {	
	margin-left: -$grid-gutter;	
	&:after {
		content: "";
		display: table;
		clear: both;
	}
}

//Any class name starting with col-
[class^="col-"] { 
	padding-left: $grid-gutter;
	float: left;
}

/* Flush grid */
.grid-flush { 
    margin-left: 0;
}
.grid-flush [class^="col-"] {  /* Flush columns */
    padding-left: 0;
}

//Grid mixin
@mixin grid-setup($namespace: ""){
	.col-1-1#{$namespace} {
		width: 100%;
	}
	.col-1-2#{$namespace} {
		width: 50%;
	}
	.col-1-3#{$namespace} {
		width: 33.33333%;
	}
	.col-1-4#{$namespace} {
		width: 25%;
	}
	.col-2-3#{$namespace} {
		width: 66.66666%;
	}
	.col-3-4#{$namespace} {
		width: 75%;
	}
}

@include grid-setup();

@media (min-width: 320px) {
	@include grid-setup('-xs');
}

@media (min-width: 480px) {
	@include grid-setup('-sm');
}

@media (min-width: 768px) {
	@include grid-setup('-md');
}

@media (min-width: 960px) {
	@include grid-setup('-lg');
}

/**
 * Just for the purpose of demo
 */

.module {
	background: #ccc;
	padding: 20px;
	margin-bottom: 10px;
	text-align: center;
	border-radius: 3px;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* CSS todo with appearnce are in an external stylesheet in settings*/
            
          
!

JS

            
              
            
          
!
999px

Console