Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

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


Auto Save

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.


                <div class="o-grid p-layout">
  <div class="o-grid__item o-grid__header">
      <label for="search">
        <input type="search" name="search" id="search" />
        <button class="c-btn c-btn--yellow">Search</button>
  <div class="o-grid__item o-grid__main">
    <button class="c-btn c-btn--yellow c-btn--3d">3D button</button>
  <div class="o-grid__item o-grid__sidebar">
    <a href="#" role="button" class="c-btn c-btn--yellow">Link button</a>
  <div class="o-grid__item o-grid__footer">
    <a href="#" role="button" class="c-btn c-btn--large c-btn--blue">Contact</a>


                /* =Variables
/* Colors */
$black: #000;
$white: #fff;
$grey: #d2d7df;
$yellow: #eca320;
$blue: #509cf6;

/* Font size */
$baseFontSize: 16;

/* =Functions
@function rem($pixels) {
  @return $pixels / $baseFontSize * 1rem;

/* =Mixins
@mixin button-3d($color) {
  box-shadow: 0px 4px darken($color, 20%);

/* =Elements style
body {
  background: #22c1c3;  /* fallback for old browsers */
  background: -webkit-linear-gradient(to right, #fdbb2d, #22c1c3);  /* Chrome 10-25, Safari 5.1-6 */
  background: linear-gradient(to right, #fdbb2d, #22c1c3); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */

/* =Objects style
.o-grid {
  display: grid;
  grid-gap: rem(10);
  grid-template-areas: "header header header"
                       "main main sidebar"
                       "footer footer footer";
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 20% 1fr 20%;

.o-grid__item {
  background-color: $grey;

.o-grid__header {
  align-items: center;
  justify-content: flex-end;
  display: flex;
  grid-area: header;
  padding: 0 rem(20);

.o-grid__main {
  grid-area: main;
  padding: rem(50);

.o-grid__sidebar {
  grid-area: sidebar;
  padding: rem(20);

.o-grid__footer {
  align-items: center;
  display: flex;
  grid-area: footer;
  justify-content: flex-end;
  padding: rem(20);

/* =Components style
/* Button */
.c-btn {
  background-color: transparent;
  border: 0;
  border-radius: rem(3);
  color: $black;
  padding: rem(5) rem(10);
  text-decoration: none;

.c-btn--large {
  font-size: rem(25);

.c-btn--3d {
  &.c-btn--yellow {
    @include button-3d($yellow);
  &.c-btn--blue {
    @include button-3d($blue);

.c-btn--yellow {
  background-color: $yellow;

.c-btn--blue {
  background-color: $blue;
  color: $white;

/* =Patterns style
.p-layout {
  background-color: $white;
  height: calc(100vh - 100px);
  margin: rem(50) auto;
  width: 70%;