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

              
                .l-ribbon.ribbon
	%header
		%h1.ribbon__title Simple CSS Ribbon
	%main.ribbon__content{:role => "main"}
		%p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur adipiscing arcu vitae lacus porta ac pellentesque massa lobortis. In arcu tortor, sagittis ac laoreet sit amet, euismod a odio.
		%p Vestibulum sit amet quam eu libero ultrices bibendum et quis massa. Quisque vestibulum semper neque a sollicitudin. Duis cursus volutpat dolor in dictum. Maecenas iaculis diam ut lacus hendrerit in fermentum augue interdum. Maecenas venenatis felis sapien, sit amet pulvinar massa.
	%footer
		%h1.ribbon__title Simple CSS Ribbon
              
            
!

CSS

              
                @import "compass/css3";

body {
  background: #e5e5e5;
  font: 16px / 1.5 Arial, sans-serif;
}

p {
  margin: 0 0 1.5em;
}

.l-ribbon {
    position: relative;
    z-index: 1;
    width: 300px;
    padding: 20px;
    margin: 20px auto;
    background: #fff;
}

.ribbon__title {
  @include text-shadow(0 1px 1px rgba(black, .2));
  @include box-shadow(0 1px 1px rgba(black, .2));
  position: relative;
  padding: 10px 30px;
  margin: 0 -30px 20px;
  font-size: 28px;
  line-height: 32px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  background: #e74c3c;
  zoom:1;
  
  &:before,
  &:after {
    content: "";
    position: absolute;
    z-index: -1;
    top: 100%;
    left: 0;
    border-width: 0 10px 10px 0;
    border-style: solid;
    border-color: transparent darken(#e74c3c, 10%);
  }
  
  &:after {
    left: auto;
    right: 0;
    border-width: 0 0 10px 10px;
  }
}

footer {
  .ribbon__title {
    margin-top: 20px;
    margin-bottom: 0;
    &:before,
    &:after {
      border-width: 10px 10px 0 0;
      top: -10px;
    }
    &:after {
      border-width: 10px 0 0 10px;
    }
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console