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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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.




// mixins ////////////////////
//em conversion function
@function em($px) { @return #{$px/16}em; }

//media query mixin
@mixin bp($bp, $min-max: min-width) {
    @media(#{$min-max}: #{$bp/16}em) { @content; }

//mixin for responsive type
@mixin flexType($vw, $min, $max ) {
  $min-size: $min / ($vw / 100);
  $max-size: $max / ($vw / 100);
  //provide the minimum font-size
  font-size: em($min);
  @include bp($min-size) {
    //setting the responsive text
    font-size: #{$vw}vw;
  @include bp($max-size) {
    //change out for max number
    font-size: em($max);

//grid mixin
@mixin grids($column-num, $vert: top) {
    $col-width: 65px;
    $gutter-width: 20px;
    $columns: 12;
    // Set container width
	$width: ($col-width * $columns) + ($gutter-width * ($columns - 1));
	// First, calculate grid size in pixels
	$grid: ($col-width * $column-num) + ($gutter-width * ($column-num - 1));
	// Then, calculate the responsive grid 
	$grid: ($grid / $width) * 100%;
    vertical-align: $vert;
    width: $grid;
    & + & { margin-left: 2%; }

//vender prefix transitions
@mixin transition ($name: all, $timing: 0.65s, $easing:$bouncy, $delay: null) {
	-webkit-transition: $name $timing $easing $delay;
	-moz-transition:    $name $timing $easing $delay;
	-ms-transition:     $name $timing $easing $delay;
	-o-transition:      $name $timing $easing $delay;
	transition:         $name $timing $easing $delay;

//vender prefix translate
@mixin trans($cord, $cord2) {
	-webkit-transform: translate($cord, $cord2);
	-ms-transform:     translate($cord, $cord2);
	transform:         translate($cord, $cord2);

//micro clearfix
@mixin cf {
	&:before {
		content: "";
		display: table;
		clear: both;

//full screen a section
@mixin full-screen {
    display: block;
    min-height: 100%;
    min-width: 100%;

//overlay background
@mixin overlay {
	bottom: 0;
	left: 0;
	position: fixed;
	right: 0;
	top: 0;
	z-index: $zOverlay;

// fonts /////////////////////
@import url(',400,800');
$open: 'Open Sans', sans-serif; 

//font weights:
$thin: 300;
$normal: 400;
$bold: 800;

// z-index ///////////////////

$zBase: 100;
$zPop: 400;
$zOverlay: 600;
$zOverContent: 800;

$bouncy: cubic-bezier(.84,-0.18,.31,1.26);