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


Babel includes JSX processing.

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


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.


                <h1>Display the breakpoint using Sass </h1>
<h2>Helps to know which breakpoint you are in, and when you might need to make a change</h2>
<p>It is fixed to the bottom and scales with you as you resize your screen</p>



                // Media Queries
// 1. Name and define our breakpoints. Name the map something sensical
// 2. Write a comma separated list of key: value, pairs that we will use later
$breakpoints: (
		xsmall: 20em,
    small: 30em,
    medium: 40em,
	  large: 55em,
    xlarge: 70em

// This wider-than mixin will run through the above key value pairs and create our media queries.
// Usage example:
// .selector {
//		width: 100%;
//		@include wider-than(medium) {
//			width: 50%;
//		}
//	}

// if selector is wider than the screensize we are calling
@mixin wider-than($screen-size) {
	// and if our map that we named $breakpoints includes values (we called them $screen-size)
	@if map-has-key($breakpoints, $screen-size) {
		// then write out a nested Media Query that will target that value as our min-width
		@media (min-width: map-get($breakpoints, $screen-size)) {
	  		// write CSS within this mixin that would apply to only this breakpoint or above
	// if the screen-size we are requesting doesn't exist, then tell me when it is compiled
	} @else {
        // Debugging
        @warn "'#{$screen-size}' has not been declared as a breakpoint.";

// Display Breakpoint During Development on Front end
@each $breakpoint, $screen-size in $breakpoints {	
	@media screen and (min-width: '#{$screen-size}') {
		body:before {
			content: '@include wider-than(#{$breakpoint}) // min-width: #{$screen-size}';

$background-color: rgba(50, 29, 103, .8);

// Could clean this up/automate it a little more but it was faster this way for now
body:before {
	background: $background-color;
	@include wider-than(xsmall) {
		background: lighten($background-color, 10%);
	@include wider-than(small) {
		background: lighten($background-color, 20%);

	@include wider-than(medium) {
		background: lighten($background-color, 30%);

	@include wider-than(large) {
		background: lighten($background-color, 40%);

	@include wider-than(xlarge) {
		background: lighten($background-color, 50%);

// For design sake

@import url(,300|Josefin+Sans:300);

body {
	background-color: #333;
	color: #fff;
	font-family: 'Josefin Slab', serif;
	font-size: 100%;
	line-height: 1;
	text-align: center;

body:before {
	bottom: 0;
	display: block;
	font-size: 1.4rem;
	padding: 1.5rem 0;
	position: fixed;
	width: 100%;

h1, h2, p {
		padding: 0 2rem;

h1 {
	font-size: 3rem;
	font-weight: 700;
	line-height: 1.2;
	margin: 2rem auto;

h2 {
	font-weight: 300;
	line-height: 1.3;
	margin: 0 auto 3rem;

p {
	font-family: 'Josefin Sans', sans-serif;
	font-size: 1.2rem;
	font-weight: 300;
	margin: 3rem auto;