Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <section class="products">
  <h1 class="products__heading">Products</h1>
  <ul class="products__list">
    <li class="products__item"><a href="#">Fashion</a></li>
    <li class="products__item"><a href="#">Notebooks &amp; tablets</a></li>
    <li class="products__item"><a href="#">Household electronics</a></li>
    <li class="products__item"><a href="#">Car equipment</a></li>
  </ul>  
</section>

<div class="products">
  <h1 class="products__heading">Products</h1>
  <div class="products__list">
    <p class="products__item"><a href="#">Fashion</a></p>
    <p class="products__item"><a href="#">Notebooks &amp; tablets</a></p>
    <p class="products__item"><a href="#">Household electronics</a></p>
    <p class="products__item"><a href="#">Car equipment</a></p>
  </div>  
</div>

<aside class="offers">
  <h2 class="offers__heading">Our current offer</h2>
  <div class="offers__content">
    <p class="offers__copy">
      This, of course, is not the real copy for this advertisement. The <em>real words</em> will be written once you have approved the headline.
    </p>
    <p class="offers__copy">
      Rest assured, the words will expand the concept. With clarity. Conviction. And even a little wit.
    </p>
  </div>
</aside>
              
            
!

CSS

              
                @mixin primaryHeading() {
  font-size: 2rem;
  text-transform: uppercase;
  border-bottom: 2px solid #000000;
  margin-bottom: 1rem;
}

@mixin copy() {
  font-size: 1rem;
  line-height: 1.2;
}

@mixin box() {
  padding: 0.5rem;
  margin: 0.5rem;
}

/* the products block */
.products {
  @include box;
  background-color: #cccccc;
  &__heading {
    @include primaryHeading;
  }
  &__list {
    @include box;
  }
  &__item {
  @include copy;
  font-weight: 700;
    a{
      text-decoration: none;
      color: inherit;
        &:focus,
        &:hover {
          text-decoration: underline;
      }
    }
  }
}

/* the offers block */
.offers {
  @include box;
  background-color: #cccccc;
  &__heading {
    @include primaryHeading;
  }
  &__content {
    @include box;
  }
  &__copy {
    @include copy;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console