123

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.

            
              <div class="container">
  
<header class="section_header full">
  <h1><a href="http://projects.thomhines.com/orderly/">orderly</a></h1>
  <h2>the world's best,<br>easiest, most flexible<br>grid system</h2>
  </header>
  
	<h3>Columns</h3>
	<p>Orderly uses a sub-column <u>and</u> fraction-based grid system. In fact, you can mix and match them as much as you'd like and Orderly will have no problem keeping up.</p>

	
	<h4>sub-columns</h4>
	<p>Orderly uses 12-column grid by default, but this can be changed by adjusting the <code>$total_columns</code> Sass variable.</p>
	
	<div class="column span-1">
		<div class="sass">column(1);</div>
	</div>
	
	<div class="column span-1">
		<div class="sass">column(1);</div>
	</div>
	
	<div class="column span-1">
		<div class="sass">column(1);</div>
	</div>
	
	<div class="column span-1">
		<div class="sass">column(1);</div>
	</div>
	
	<div class="column span-1">
		<div class="sass">column(1);</div>
	</div>
	
	<div class="column span-1">
		<div class="sass">column(1);</div>
	</div>
	
	<div class="column span-1">
		<div class="sass">column(1);</div>
	</div>
	
	<div class="column span-1">
		<div class="sass">column(1);</div>
	</div>
	
	<div class="column span-1">
		<div class="sass">column(1);</div>
	</div>
	
	<div class="column span-1">
		<div class="sass">column(1);</div>
	</div>
	
	<div class="column span-1">
		<div class="sass">column(1);</div>
	</div>
	
	<div class="column span-1">
		<div class="sass">column(1);</div>
	</div>
	
	<div class="column span-12">
		<div class="sass">column(12);</div>
	</div>
	
	<div class="column span-6">
		<div class="sass">column(6);</div>
	</div>
	
	<div class="column span-6">
		<div class="sass">column(6);</div>
	</div>
		
	
	<div class="column span-8">
		<div class="sass">column(8);</div>
	</div>
	
	<div class="column span-4">
		<div class="sass">column(4);</div>
	</div>
	
	<div class="column span-3">
		<div class="sass">column(3);</div>
	</div>
	
	<div class="column span-3">
		<div class="sass">column(3);</div>
	</div>
	
	<div class="column span-3">
		<div class="sass">column(3);</div>
	</div>
	
	<div class="column span-3">
		<div class="sass">column(3);</div>
	</div>
	
	<div class="column span-5">
		<div class="sass">column(5);</div>
	</div>
	
	<div class="column span-7">
		<div class="sass">column(7);</div>
	</div>
	
	

	<div class="section_header full">
		<h4>fraction-based columns</h4>
		<p>Or you can use fractions to determine the width of a column relative to the width of the container.<br>Orderly handles fraction (eg. 1/4), percentage (eg. 25%), and decimal (eg. 0.25) values.</p>
	</div>
	
	<div class="column one-third">
		<div class="sass">column(1/3);</div>
	</div>
	<div class="column one-third">
		<div class="sass">column(1/3);</div>
	</div>
	<div class="column one-third">
		<div class="sass">column(1/3);</div>
	</div>
	
	
	
	
	<div class="column seventy-five-percent">
		<div class="sass">column(75%);</div>
	</div>
	<div class="column twenty-five-percent">
		<div class="sass">column(25%);</div>
	</div>
		
	
	
	<div class="column one-sixth">
		<div class="sass">column(1/6);</div>
	</div>
	<div class="column one-sixth">
		<div class="sass">column(1/6);</div>
	</div>
	<div class="column one-sixth">
		<div class="sass">column(1/6);</div>
	</div>
	<div class="column one-sixth">
		<div class="sass">column(1/6);</div>
	</div>
	<div class="column one-sixth">
		<div class="sass">column(1/6);</div>
	</div>
	<div class="column one-sixth">
		<div class="sass">column(1/6);</div>
	</div>
	
	
	
	<div class="column point-four">
		<div class="sass">column(0.4);</div>
	</div>
	<div class="column point-six">
		<div class="sass">column(0.6);</div>
	</div>
	
	
	
	<div class="section_header full">
		<h4>whatever you want</h4>
		<p>Have an unconventional grid system in mind? Don't worry, Orderly can handle it.</p>
	</div>

	
	<div class="column one-eighth">
		<div class="sass">column(1/8);</div>
	</div>
	
	<div class="column three-tenths">
		<div class="sass">column(3/10);</div>
	</div>
	
	<div class="column two-fifths">
		<div class="sass">column(2/5);</div>
	</div>
	
	<div class="column seven-fortieths">
		<div class="sass">column(7/40);</div>
	</div>
	
	
	
	<div class="section_header full">
		<h4>mix and match</h4>
		<p>And it works even with columns of different types.</p>
	</div>

	<div class="column span-3">
		<div class="sass">column(3);</div>
		sub-column
	</div>
	
	<div class="column one-fourth ">
		<div class="sass">column(1/4);</div>
		fraction
	</div>
	
	<div class="column point-two-five">
		<div class="sass">column(0.25);</div>
		decimal
	</div>
	
	<div class="column twenty-five-percent">
		<div class="sass">column(25%);</div>
		percentage
	</div>







	<div class="section_header full">
		<h3>Shifting columns left and right</h3>
		<p>To add space between columns, use the <code>push-left()</code> and <code>push-right()</code> mixins.</p>
	</div>
	
	<div class="column one-sixth">
		<div class="sass">column(1/6);</div>
	</div>
		
	<div class="column two-third push-left-one-sixth">
		<div class="sass">column(2/3);<br>push-left(1/6);</div>
	</div>

	<div class="column two-third push-right-one-sixth">
		<div class="sass">column(2/3);<br>push-right(1/6);</div>
	</div>
	
	<div class="column one-sixth">
		<div class="sass">column(1/6);</div>
	</div>
	
	
	

	<div class="section_header full">
		<h3>Re-Ordering Columns</h3>
		<p>The <code>swap()</code> mixin will swap the order of columns relative to the order they appear in the HTML. That means that content will appear right-to-left instead of the default left-to-right. (Unless, of course, you've set the default text direction to be right to left. In that case, swap() will do the opposite.)</p>
	</div>
	
	<div class="column one-half swap">
		<div class="sass">column(1/2);<br>swap();</div>
		appears first in html
	</div>
	
	<div class="column one-half swap">
		<div class="sass">column(1/2);<br>swap();</div>
		appears second in html
	</div>
	
	

	<div class="section_header full">
		<h3>Responsive Stuff</h3>
		<p>Columns can easily be adjusted at various breakpoints. Just add a breakpoint to the <code>column()</code> mixin and Orderly will apply the width of that column once the browser width has dropped below the stated breakpoint.</p>
		<p>You can use more than one <code>column()</code> entry if you want to control how the column works at several browser sizes.</p>
	</div>
	
	<div class="column one-fourth full-md">
		<div class="sass">column(1/4);<br>column(100%, 'md');</div>
	</div>

	<div class="column one-fourth one-third-md full-sm">
		<div class="sass">column(1/4);<br>column(1/3, 'md');<br>column(100%, 'sm');</div>
	</div>
	
	<div class="column one-fourth one-third-md half-sm">
		<div class="sass">column(1/4);<br>column(1/3, 'md');<br>column(50%, 'sm');</div>
	</div>
	
	<div class="column one-fourth one-third-md half-sm">
		<div class="sass">column(1/4);<br>column(1/3, 'md');<br>column(50%, 'sm');</div>
	</div>
	
	
	

	<div class="section_header full">
		<p>The same rules work for <code>push-left()</code> and <code>push-right()</code>.</p>
	</div>
	
 
	<div class="column one-sixth">
		<div class="sass">column(1/6);</div>
	</div>
  
  <div class="column two-third push-left-md">
		<div class="sass">column(2/3);<br>push-left(1/6);<br>push-left(0, 'md');</div>
	</div>
	
   <div class="column two-third push-right-md">
		<div class="sass">column(2/3);<br>push-right(1/6);<br>push-right(0, 'md');</div>
	</div>
  
	<div class="column one-sixth">
		<div class="sass">column(1/6);</div>
	</div>
  


	<div class="section_header full">
		<p>Plus, Orderly comes with the handy <code>breakpoint()</code> mixin to let you apply your own styles at various browser sizes.</p>
	</div>
	
	<div class="column one-third breakpoint-min">
		<div class="sass">breakpoint($md) {<br>&nbsp;&nbsp;&nbsp;&nbsp;background: #aea;<br>}</div>
	</div>
	
	<div class="column one-third breakpoint-both">
		<div class="sass">breakpoint($md, $lg) {<br>&nbsp;&nbsp;&nbsp;&nbsp;background: #aea;<br>}</div>
	</div>
	
	<div class="column one-third breakpoint-max">
		<div class="sass">breakpoint(false, $lg) {<br>&nbsp;&nbsp;&nbsp;&nbsp;background: #aea;<br>}</div>
	</div>
	
	

	<div class="section_header full">
		<h3>Nested Columns</h3>
		<p>No fancy tricks here. Just place your nested columns inside your parent columns in your HTML and Orderly will do the rest.</p>
	</div>
	
	<div class="column full nested">	
		<div class="sass">column();</div>	
		<div class="column one-third">
			<div class="sass">column(1/3);</div>
			<div class="column one-third">
				<div class="sass">column(1/3);</div>
			</div>
			
			<div class="column one-third">
				<div class="sass">column(1/3);</div>
			</div>
			
			<div class="column one-third">
				<div class="sass">column(1/3);</div>
			</div>
		</div>
		
		<div class="column two-third">
			<div class="sass">column(2/3);</div>
			<div class="column one-half">
				<div class="sass">column(1/2);</div>
			</div>
			
			<div class="column one-fourth">
				<div class="sass">column(1/4);</div>
			</div>
			
			<div class="column one-fourth">
				<div class="sass">column(1/4);</div>
			</div>
		</div>
		
	</div>
	
	
	
	



	<div class="section_header full">
		<h3>Rows</h3>
		<p>If you need to keep your content on separate lines &mdash; even if the width of the columns doesn't add up to the full width of the container &mdash; <code>row()</code> will do the trick.</p>
	</div>
	
	<div class="row">
		<div class="sass">row();</div>
		<div class="column one-third">
			<div class="sass">column(1/3);</div>
		</div>
	</div>
	<div class="row">
		<div class="sass">row();</div>
		<div class="column one-half">
			<div class="sass">column(1/2);</div>
		</div>
	</div>
		<div class="row">
		<div class="sass">row();</div>
		<div class="column two-fifths">
			<div class="sass">column(2/5);</div>
		</div>
	</div>
	

	<div class="section_header full">
		<h3>Showing/Hiding content</h3>
		<p>Some content should only be visible when the browser is at certain browser sizes. The <code>show()</code> and <code>hide()</code> mixins will allow you to control this by setting at which breakpoints the content should be shown/hidden.</p>
	</div>
	
	<div class="show_hide_container">
		<div class="column hidden show">
			<div class="sass">column(1/2);<br>show('lg');</div>
			
		</div>
		<p class="show_hide_label">this column appears at smaller screen sizes</p>
	</div>
	
	<div class="show_hide_container">	
		<div class="column hide">
			<div class="sass">column(1/2);<br>hide('md');</div>
		</div>
		<p class="show_hide_label">this column disappears at smaller screen sizes</p>
	</div>	



</div>
            
          
!
            
              

// Wide assortment of column sizes
// Feel free to add your own

.full {
	@include column();
}

.span-1 {
	@include column(1);
}

.span-2 {
	@include column(2);
}

.span-3 {
	@include column(3);
}

.span-4 {
	@include column(4);
}

.span-5 {
	@include column(5);
}

.span-6 {
	@include column(6);
}

.span-7 {
	@include column(7);
}

.span-8 {
	@include column(8);
}

.span-9 {
	@include column(9);
}

.span-10 {
	@include column(10);
}

.span-11 {
	@include column(11);
}

.span-12 {
	@include column(12);
}

.one-half {
	@include column(1/2);
}

.one-third {
	@include column(1/3);
}

.two-third {
	@include column(2/3);
}

.one-sixth {
	@include column(1/6);
}

.one-fourth {
	@include column(1/4);
}

.one-eighth {
	@include column(1/8);
}

.three-tenths {
	@include column(3/10);
}

.two-fifths {
	@include column(2/5);
}

.three-fifths {
	@include column(3/5);
}

.seven-fortieths {
	@include column(7/40);
}

.twenty-five-percent {
	@include column(25%);
}

.point-two-five {
	@include column(0.25);	
} 

.point-four {
	@include column(0.4);
	
}

.point-six {
	@include column(0.6);
	
}

.seventy-five-percent {
	@include column(75%);	
} 



// Push/Pull

.push-left-one-sixth {
	@include push-left(1/6);
}

.push-right-one-sixth {
	@include push-right(1/6);
}




// Responsive column sizes

.full-md {
	@include column(100%, 'md');
}

.one-third-md {
	@include column(1/3, 'md');
}

.full-sm {
	@include column(100%, 'sm');
}

.half-sm {
	@include column(50%, 'sm');
}

.push-left-md {
  @include push-left(1/6);
  @include push-left(0, 'md');
}

.push-right-md {
  @include push-right(1/6);
  @include push-right(0, 'md');
}

.breakpoint-min {
	@include breakpoint($md) {
		background: #aea;
	}
}

.breakpoint-both {
	@include breakpoint($md, $lg) {
		background: #aea;
	}
}

.breakpoint-max {
	@include breakpoint(0, $md) {
		background: #aea;
	}
}




// Other examples

.row {
	@include row;
	position: relative;
	margin-bottom: 3px;
	border: 1px dashed $charcoal;
}

.swap {
	@include swap;
}

.hidden {
	display: none;
}

.hide {
	@include hide('md');
}


.show {
	@include show('lg');
}

            
          
!
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