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

              
                <div class="alert alert-warning">
  <button type="button" class="close">&times;</span></button>
  <div class="alert-icon">
    <i class="fa fa-warning"></i>
  </div>
  <div class="alert-text">
    <h5>Warning</h5> 
    <ul>
      <li><a href="#" class="alert-link">Freeze Warning Until Wed Oct 04, 2017, 1:00:00 AM</a></li>
      <li><a href="#" class="alert-link">Freeze Warning Until Wed Oct 05, 2017, 11:07:00 AM</a></li>
      <li><a href="#" class="alert-link">Freeze Warning Until Wed Oct 06, 2017, 2:40:00 PM</a></li>
    </ul>  
  </div>
</div>

<!-- NEW CLASS: "ALERT-HELP" DOES NOT EXIST IN DEFAULT BOOTSTRAP ALERT SYSTEM  -->
<div class="alert alert-help">
  <div class="alert-icon">
    <i class="glyphicon glyphicon-question-sign"></i>
  </div>
  <div class="alert-text">
    <h5>Help</h5> 
    Indicates neutral informative to aid in understanding.
  </div>
</div>

<div class="alert alert-info">
  <div class="alert-icon">
    <i class="glyphicon glyphicon-info-sign"></i>
  </div>
  <div class="alert-text">
    <h5>Info</h5> 
    Indicates a neutral informative change or action. I am intentionally long to demonstrate what it should look like within the new alert and I also  <a href="#" class="alert-link">hyperlink</a> out to things and stuff. 
   </div>
</div>

<div class="alert alert-danger">
  <button type="button" class="close">&times;</span></button>
  <div class="alert-icon">
    <i class="glyphicon glyphicon-remove-sign"></i>
  </div>
  <div class="alert-text">
    <h5>Error</h5> 
    Indicates a warning that might need attention.
  </div>
</div>

<div class="alert alert-success">
  <div class="alert-icon">
    <i class="glyphicon glyphicon-ok-circle"></i>
  </div>
  <div class="alert-text">
    <h5>Success</h5> 
    Indicates a successful or positive action.
  </div>
</div>


              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css?family=Open+Sans:300,500,600,700,800");

// --------- Demo Styles Only ---------
* {
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  color: #2d3a51;
  line-height: 1.4;
  padding: 5rem;
}

// --------- Variables ---------
@alert-help: #ffab00;
@alert-warning: #ff5400;
@alert-info: #3592ff;
@alert-error: #d33534;
@alert-success: #42ae42;

//  --------- Alert Adjustments ---------
.alert {
  position: relative;
  padding: 0;
  min-width: 250px;
}

.alert button.close {
  margin: 0.45rem 1rem;
  opacity: 0.75;

  &:hover {
    opacity: 1;
  }
}

.alert-icon,
.alert-text {
  display: table-cell;
  vertical-align: middle;
}

.alert-icon {
  min-width: 40px;
  text-align: center;
  font-size: 2.2rem;
  color: white;
  background-color: rgba(0, 0, 0, 0.25);
  padding: 1rem;
}

.alert-text {
  color: #2d3a51; // This should be whatever the defualt body copy color is for FIRECARES
  padding: 2.4rem;
  width: 100%;
}

.alert-text > h5 {
  margin-top: 0;
  font-weight: 600;
}

.alert .alert-link {
  font-weight: normal;
  color: #4790e6;
}

.alert ul {
  margin: 0;
  li {
    margin-bottom: 0.2rem;
    &:last-child {
      margin-bottom: 0;
    }
  }
}

//  --------- Alert Types ---------

// Warning
.alert-warning {
  background-color: lighten(@alert-warning, 48%);
  border-color: lighten(@alert-warning, 35%);

  .alert-text h5 {
    color: @alert-warning;
  }

  button.close {
    color: @alert-warning;
  }

  .alert-icon {
    background-color: @alert-warning;
  }
}

// Help
.alert-help {
  background-color: lighten(@alert-help, 48%);
  border-color: lighten(@alert-help, 34%);

  .alert-text h5 {
    color: @alert-help;
  }

  button.close {
    color: @alert-help;
  }

  .alert-icon {
    background-color: @alert-help;
  }
}

// Info
.alert-info {
  background-color: lighten(@alert-info, 38%);
  border-color: lighten(@alert-info, 30%);

  .alert-text h5 {
    color: @alert-info;
  }

  button.close {
    color: @alert-info;
  }

  .alert-icon {
    background-color: @alert-info;
  }
}

// Error
.alert-danger {
  background-color: lighten(@alert-error, 46%);
  border-color: lighten(@alert-error, 38%);

  .alert-text h5 {
    color: @alert-error;
  }

  button.close {
    color: @alert-error;
  }

  .alert-icon {
    background-color: @alert-error;
  }
}

// Success
.alert-success {
  background-color: lighten(@alert-success, 48%);
  border-color: lighten(@alert-success, 34%);

  .alert-text h5 {
    color: @alert-success;
  }

  button.close {
    color: @alert-success;
  }

  .alert-icon {
    background-color: @alert-success;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console