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="container">
    <div class="cols">
      <div class="col one">
        <div class="box"><strong>1</strong> &rarr; make-flex(4)</div>
      <div class="col two">
        <div class="box"><strong>2</strong> &rarr; make-flex(4)</div>
      <div class="col">
        <div class="box"><strong>3</strong> &rarr; make-flex(4)</div>
      <div class="col six">
        <div class="cols">
          <div class="col six">
            <div class="box"><strong>4</strong> &rarr; Nested update-flex(3 of 6)</div>
          <div class="col six">
            <div class="box"><strong>4</strong> &rarr; Nested update-flex(3 of 6)</div>
      <div class="col six">
        <div class="box"><strong>5</strong> &rarr; update-flex(6)</div>



.container {
  width: 1200px;
  max-width: 100%;
  margin: auto;
  @media(max-width:1400px) {
    width: 960px;
  @media(max-width: 1050px) {
    width: 800px;
    padding: 0 1.5rem;

// Superior.scss flexbox columns must hav a parent
// that uses the cols() mixin
.cols {
  @include cols();

// Make superior.scss flexbox columns
.col {
  @include make-flex(4);

// Use updateFlex() to update the flex & max-width 
// and avoid redefining padding etc. 
.col.six { @include update-flex(6); }

// Nested cols? No problem. Change the total number
// of columns as the 2nd paramter (defaults to $cols var)
// of updateFlex()
.col > .cols .col.six { @include update-flex(3, 6); }

@media(max-width: 768px) {
  .col.six { @include update-flex(12); }

// =======================
// ===== DEMO STYLES =====
// =======================
$sf: system, -apple-system, BlinkMacSystemFont,
      "Helvetica Neue", "Lucida Grande";

* { box-sizing: border-box; }

body { 
  margin: 0;
  margin-top: 100px;
  font-family: $sf;
  font-size: 1rem;
  color: #3b4148;

// add margin above & below columns
.col { margin: 0.5rem 0; }

// Remove margin from nested columsn
.col > .cols .col { margin: 0;}

// add dashed border around column wrapper
.cols { border: 1px dashed #d3d5d8; border-radius: 2px; }

// Add fill to columns to show size
.box {
  box-sizing: border-box;
  width: 100%;
  background-color: #edeef0;
  border-radius: 0.125rem;
  padding: 0.75rem 1rem;
  line-height: 1rem;
  font-size: 0.75rem;

h1 {
  text-align: center;
  margin-bottom: 2rem;