Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <section>
  <h1>Lobotomized owl awesomness</h1>
  <div>
    <div>nothing above</div>
    <div>&lt;div&gt; above</div>
  </div>
  <div>
    <meta>
    <div>&lt;meta&gt; above</div>
    <div>&lt;div&gt; above</div>
  </div>
  <div>
    <link>
    <div>&lt;link&gt; above</div>
    <div>&lt;div&gt; above</div>
  </div>
  <div>
    <script></script>
    <link>
    <meta>
    <div>&lt;script&gt;, &lt;link&gt;, &lt;meta&gt; above</div>
    <div>&lt;div&gt; above</div>
  </div>
  <div>
    <div>nothing above</div>
    <script></script>
    <link>
    <meta>
    <div>&lt;div&gt;, &lt;script&gt;, &lt;link&gt;, &lt;meta&gt; above</div>
    <div>&lt;div&gt; above</div>
  </div>
</section>


<section>
  <div>
    <div>nothing above</div>
    <div>&lt;div&gt; above</div>
  </div>
  <div>
    <meta>
    <div>&lt;meta /&gt; above</div>
    <div>&lt;div&gt; above</div>
  </div>
  <div>
    <link>
    <div>&lt;link&gt; above</div>
    <div>&lt;div&gt; above</div>
  </div>
  <div class="compact">
    <div>nothing above</div>
    <script></script>
    <div>&lt;script&gt; above</div>
    <div class="reset" style="background: red">&lt;div&gt; above, and class of reset</div>
  </div>
  <div>
    <div>nothing above</div>
    <script></script>
    <div class="reset" style="background: red">&lt;script&gt; above, and class of reset</div>
  </div>
</section>

              
            
!

CSS

              
                @import "compass/css3";

// @description 
// Since there're a few elements that shouldn't mess with the layout of a page but are common to add to a page outside of the <head>.
@mixin owl($selector: unquote("*")){
 *:not(style):not(link):not(meta):not(script) ~ #{$selector}{
  @content;
 }
}



// @name Axiomatic CSS(the beset reset ever)
// @description
//  1. Resets the `box-model` to what it should have been.
//  2. Resets the margin for all elements.
//  3. The pseudo elements inherit it's parent box-sizing style.
//  4. Pseudo elements have a default content of `""` so you don't have to declare it.
//  5. Pseudo elements are absolutely positioned by default since absolutely positioned
//     pseudo elements out number relatively positioned pseudo elements.
*{
 box-sizing: border-box; // 1
 margin: 0; // 2
 &:after, &:before{
  box-sizing: inherit; // 3
  content: ""; // 4
  position: absolute; // 5
 }
 :root > &{
  margin: 0;  
 }
}
// @name lobotmoized owl selector
// @description
// Auto layout for all elements.
//  1. Adds correct spacing for all elements.
//  2. Adds a larger space 
@include owl{ // 1
  margin-top: 1em;
}
@include owl(section){ // 2
  margin-top: 3em;
}


// @name Margins off
// @description - This resets the margin-top to what it was originally, without the Lobotomized Owl selector
// @todo Possibly rename this to be .reset-extended
.owl-off > * + *{
  margin-top: 0;
  margin-top: initial;
}

// @name Compact
// @description - This is used to make sections compact when needed. It is half the size of the Lobotomized Owl selector
.compact > * + *{
  margin-top: .5em;
}


// To show that reset doesn't cause any issues with specificity.
.reset{
  list-style: none outside none;
  margin: 0;
  padding: 0;
}


// for demo purposes only.
body{
  font: 12px/1.35em "Source Code Pro", "Courier new";
}
div, section{
  background: rgba(black, .25);
  padding: 10px;
}
h1{
  text-align: center;
}
              
            
!

JS

              
                
              
            
!
999px

Console