css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

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

            
          
!
            
              @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;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console