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

              
                <p class="info warning">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec erat nec odio consequat lacinia nec id leo. Morbi nec malesuada ante. Maecenas consequat pretium dolor a sodales. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Pellentesque urna mauris, dapibus vel viverra ac, ultrices in tellus. Donec sit amet dolor vel velit varius pulvinar in sed massa. Duis feugiat nunc non risus gravida imperdiet. Praesent justo dolor, luctus id viverra eget, gravida vitae velit. Proin bibendum venenatis porttitor. Morbi auctor libero nec tellus pharetra vulputate. Duis lobortis sagittis est porta venenatis.
</p><p class="info">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec erat nec odio consequat lacinia nec id leo. Morbi nec malesuada ante. Maecenas consequat pretium dolor a sodales. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Pellentesque urna mauris, dapibus vel viverra ac, ultrices in tellus. Donec sit amet dolor vel velit varius pulvinar in sed massa. Duis feugiat nunc non risus gravida imperdiet. Praesent justo dolor, luctus id viverra eget, gravida vitae velit. Proin bibendum venenatis porttitor. Morbi auctor libero nec tellus pharetra vulputate. Duis lobortis sagittis est porta venenatis.
</p>
              
            
!

CSS

              
                @import "compass/css3";

/*
The MIT License (MIT)
Copyright (c) 2013 Aaron Huang <github.com/aar0nTw>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

$blue:#33A6B8;
$dark-blue:#2B5F75;
$light-blue:#A5DEE4;

$red:#DB4D6D;
$dark-red:#9F353A;
$light-red:#F4A7B9;
$info-content: "Info";
$warning-content: "Warning";
$block-padding: 2em 2em 1em;

p.info {
  position: relative;
  background: $light-blue;
  padding: $block-padding;
  margin: 24px;
  font-size:16pt;
  &:before {
      content: $info-content;
      color: #fff;
      background: $blue;
      display: block;
      position: absolute;
      top: -9px;
      left: -18px;
      padding: 9px 18px 9px;
  }
  &:after{
      content: " ";
      display: block;
      position: absolute;
      border: 9px solid transparent;
      border-top-color: $dark-blue;
      border-right-color: $dark-blue;
      top: 33px;
      left: -18px;
  }
    
  &.warning {
      background: $light-red;
      &:before {
          content: $warning-content;
          background: $red;
      }
      &:after{
          border-top-color: $dark-red;
          border-right-color: $dark-red;
      }
  }
}


              
            
!

JS

              
                
              
            
!
999px

Console