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.


                <div class="intro">
  All of these divs have the same source order.
<div class="flex">
  <div class="flex--1 box box--yellow">1</div>
  <div class="flex--1 box box--orange">2</div>
  <div class="flex--1 box box--ltblue">3</div>
  <div class="flex--1 box box--purple">4</div>
  <div class="flex--1 box box--red">5</div>
  <div class="flex--1 box box--blue">6</div>
  <div class="flex--1 box box--brown">7</div>
  <div class="flex--1 box box--green">8</div>
<div class="flex">
  <div class="flex--1 box box--yellow order--7">1</div>
  <div class="flex--1 box box--orange order--6">2</div>
  <div class="flex--1 box box--ltblue order--5">3</div>
  <div class="flex--1 box box--purple order--1">4</div>
  <div class="flex--1 box box--red order--8">5</div>
  <div class="flex--1 box box--blue order--2">6</div>
  <div class="flex--1 box box--brown order--4">7</div>
  <div class="flex--1 box box--green order--3">8</div>
<div class="flex">
  <div class="flex--1 box box--yellow order--8">1</div>
  <div class="flex--1 box box--orange order--7">2</div>
  <div class="flex--1 box box--ltblue order--6">3</div>
  <div class="flex--1 box box--purple order--5">4</div>
  <div class="flex--1 box box--red order--4">5</div>
  <div class="flex--1 box box--blue order--3">6</div>
  <div class="flex--1 box box--brown order--2">7</div>
  <div class="flex--1 box box--green order--1">8</div>



                * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
html {
  font: 300 100%/1 Avenir, Avenir Next, sans-serif;
    background: #F8F5F0;
  color: #535353;
.intro { 
  text-align: center; 
  padding: 2rem 1rem;
  font-size: 1.25rem;

.flex { 
  display: flex;
  &--1 { 
    flex: 1;

.order {
  @for $i from 1 through 9 {
    &--#{$i} { order: $i; }
.box {
  height: 20vh;
  color: white;
  padding: 6vh .5rem;
  text-align: center;
  font-weight: 100;
  font-size: 8vh;
  &--ltblue { background: lighten(mix(#3081B7, #0D333C), 15%); }
  &--blue   { background: mix(#3081B7, #0D333C); }
  &--orange { background: #F65B26; }
  &--yellow { background: #ffba00; }
  &--purple { background: mix(#663399, lighten(mix(#3081B7, #0D333C), 12.5%)); }
  &--green  { background: #7F9009; }
  &--red    { background: #DA3733; }
  &--brown  { background: darken(#CB4B16, 12.5%); }