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

              
                <p>
  Sass Mixin to make a button look like link. This is based solely to the article by <a href="http://www.456bereastreet.com/archive/201110/styling_button_elements_to_look_like_links/">Roger Johanson</a>.
</p>
<p>
  This comes handy when you need a link looking button and want to be semantic at the same time.
</p>
<p>
  You may, of course, style the link to suit your design. I've styled it to look like the default blue link.
</p>

<table>
  <tr>
    <td>Button element</td>
    <td><button>Button</button></td>
  </tr>
   <tr>
    <td>Normal link</td>
    <td><a href="#">Button</a></td>
  </tr>
  <tr>
    <td>Linkified button element</td>
    <td><button class="button">Button</button></td>
  </tr>
</table>
              
            
!

CSS

              
                @mixin link-button() {
    overflow: visible; // Shrinkwrap the text in IE7-
    margin: 0;
    padding: 0;
    border: 0;
    color: blue; // Match your link colour
    background: transparent;
    font: inherit; // Inherit font settings (doesn’t work in IE7-)
    line-height: normal; // Override line-height to avoid spacing issues
    text-decoration: underline; // Make it look linky
    cursor: pointer; // Buttons don’t make the cursor change in all browsers
    -moz-user-select: text; // Make button text selectable in Gecko

    /* Remove mystery padding in Gecko browsers.
     * See https://bugzilla.mozilla.org/show_bug.cgi?id=140562
     */
    &::-moz-focus-inner {
        padding: 0;
        border: 0;
    }
}

.button {
    @include link-button();
}

// Reset / styling
body {
    margin: 20px;
    max-width: 600px;
}
td {
    padding: 4px 20px 4px 0;
}
p {
    color: #888;
}
              
            
!

JS

              
                
              
            
!
999px

Console