Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

Save Automatically?

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="container">
  <div class="row">
    <div class="col-md-12">
      <h1>Better Bootstrap Buttons</h1>
      <p class="lead">Better buttons using <b>SASS Mixins</b> for easy maintenance.</p>
      <hr />
    </div>
    <div class="col-md-12">
      
      <p>
        <button type="button" class="btn btn-default btn-lg">Large button</button>
        <button type="button" class="btn btn-primary btn-lg">Large button</button>
        <button type="button" class="btn btn-info btn-lg">Large button</button>
        <button type="button" class="btn btn-success btn-lg">Large button</button>
        <button type="button" class="btn btn-warning btn-lg">Large button</button>
        <button type="button" class="btn btn-danger btn-lg">Large button</button>
      </p>
      <hr />
      <p>
        <button type="button" class="btn btn-default">Default button</button>
        <button type="button" class="btn btn-primary">Default button</button>
        <button type="button" class="btn btn-info">Default button</button>
        <button type="button" class="btn btn-success">Default button</button>
        <button type="button" class="btn btn-warning">Default button</button>
        <button type="button" class="btn btn-danger">Default button</button>
      </p>
      <hr />
      <p>
        <button type="button" class="btn btn-default btn-sm">Small button</button>
        <button type="button" class="btn btn-primary btn-sm">Small button</button>
        <button type="button" class="btn btn-info btn-sm">Small button</button>
        <button type="button" class="btn btn-success btn-sm">Small button</button>
        <button type="button" class="btn btn-warning btn-sm">Small button</button>
        <button type="button" class="btn btn-danger btn-sm">Small button</button>
      </p>
      <hr />
      <p>
        <button type="button" class="btn btn-default btn-xs">Extra small button</button>
        <button type="button" class="btn btn-primary btn-xs">Extra small button</button>
        <button type="button" class="btn btn-info btn-xs">Extra small button</button>
        <button type="button" class="btn btn-success btn-xs">Extra small button</button>
        <button type="button" class="btn btn-warning btn-xs">Extra small button</button>
        <button type="button" class="btn btn-danger btn-xs">Extra small button</button>
      </p>
      
    </div>
  </div>
</div>
              
            
!

CSS

              
                // Bootstrap Colors
$default: #ffffff;
$primary: #428bca;
$success: #5cb85c;
$info:    #5bc0de;
$warning: #f0ad4e;
$danger:  #d9534f;

// Reset and Sizing
.btn {
  margin: .2em .1em; // Demo Only
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
  font-size: 1em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  border: none;
  border-bottom: .15em solid black;
  border-radius: 3px;
  padding: 0.65em 1.3em;}

.btn-lg {
  padding: 1em 2em;}

.btn-sm,
.btn-xs {
  font-size: .85em;
  padding: .5em 1em;}

.btn-xs {
  font-size: .85em;
  padding: .25em .75em;}

// Colors
@mixin btn($btncolor){
  border-color: darken($btncolor,15%);
  background-image: linear-gradient($btncolor, darken($btncolor,5%));
  &:hover {
    background: linear-gradient(darken($btncolor,5%), darken($btncolor,10%));
  }
}

.btn-default { @include btn($default);}
.btn-primary { @include btn($primary);}
.btn-success { @include btn($success);}
.btn-info    { @include btn($info);}
.btn-warning { @include btn($warning);}
.btn-danger  { @include btn($danger);}
              
            
!

JS

              
                
              
            
!
999px

Console