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

              
                .notify.info
  span Hello! This is an information notification.
  span This is the description field for more information
  i.fa.fa-info-circle
  
.notify.success
  span Hello! This is an information notification.
  span This is the description field for more information
  i.fa.fa-check-circle
  
.notify.warning
  span Hello! This is an information notification.
  span This is the description field for more information
  i.fa.fa-exclamation-triangle
  
.notify.error
  span Hello! This is an information notification.
  span This is the description field for more information
  i.fa.fa-exclamation-triangle
  
.notify.dark
  span Hello! This is an information notification.
  span This is the description field for more information
  i.fa.fa-question-circle
      
              
            
!

CSS

              
                @import "compass/css3";

@import url(https://fonts.googleapis.com/css?family=Lato:400,700);
@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700');
@import url(https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css);

html, body {
  background-color: #303030;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
}

$height: 50px;
  
.notify {
  position: relative;
  
  width: 460px;
  height: $height - 4*2;
  
  font-family: "Open Sans";
  font-size: 0.9em;
  font-weight: 300;
  
  padding: 4px;
  margin: 20px;
  
  @include border-radius(4px);
  @include box-shadow(0 0 10px Black);
  
  span {
    display: block;
    margin-left: 50px;
  }
  
  span:nth-child(1) {
    font-weight: 700;  
  }

  i {
    position: absolute;
    left: 0px;
    top: 0px;
    width: 40px;
    height: $height;
    font-size: 32px;
    
    text-align: center;
    line-height: $height;
    vertical-align: middle;
    
  }
  
}
// a1ccff
@mixin setColor($backColor, $textColor) {
  color: $textColor;  
  border: 1px solid darken($backColor, 30);
  @include background(linear-gradient(top, $backColor, darken($backColor, 10)));
  
  i {
    background: desaturate(darken($backColor, 15), 10);
    color: darken($textColor, 5);  
    @include text-shadow(0px 1px 1px lighten($backColor, 10));
  }
}


.info {
  @include setColor(#cae2ff, #004d7e);
}

.success {
  @include setColor(#cdecc2, #0d8801);
}

.warning {
  @include setColor(#ffdd9c, #7a5f24);
}

.error {
  @include setColor(#ffcece, #a44646);
}

.dark {
  @include setColor(#3e3e3e, #ddd);
}
              
            
!

JS

              
                # Inspired by http://dribbble.com/shots/570752-System-Notifications
              
            
!
999px

Console