cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation


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.

              <h1 class="title">
  Topcoat Mobile Button
  Default style for Topcoat Mobile Button.
  Requirements are portable and accessible markup with flexible and performant css. 

  Topcoat CSS separates reset from the theme.
  Reset styles are used to
        Remove browser default styles. *such as default padding etc.
        Set up inheritance so as to use the cascade. *You know, the C in CSS.
        Create a reusable base component for anyone to style on top of.
        Use as a baseline component for performance testing.
<h3>Base Button</h3>
<button class="button">

*doesn't look like much does it

<h3>Styled Button</h3>
<button class="topcoat-button">

<div class="spacer">

  <a href="https://www.twitter.com/dam">@dam</a> ♥s you
<script src="//use.edgefonts.net/source-sans-pro:n3,n4,n6;source-code-pro:n3.js"></script>
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
              body {
  padding: 0 50px;
  background-color: #f4f4f4;
  font-family: source-sans-pro, sans-serif;

/* Removes defualt blurry focus ring */
:focus {
  outline-color: transparent;
  outline-style: none;

.title {
  letter-spacing: -.065em;

.spacer {
  padding: 25px 0;

/* Extend reset styles */
.button {
  /* Add relative positioning so we can use z-index for active buttons */
  position: relative;
  /* Inline block so that any display type element can be layed out inline */
  display: inline-block;
  vertical-align: top;
  box-sizing: border-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  /* Set up cascade */
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  cursor: default;
  user-select: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  /* Allows for use with anchor tags */
  text-decoration: none;

/* Add all Topcoat specific styles */
.topcoat-button {
  padding: 0 1.25rem;
  font-size: 16px;
  /* vertically center button text */
  line-height: 3rem;
  -webkit-border-radius: 6px;
  border-radius: 6px;
  color: #454545;
  text-shadow: 0 1px #fff;
  background-color: #e5e9e8;
  -webkit-box-shadow: inset 0 1px #fff;
  box-shadow: inset 0 1px #fff;
  border: 1px solid #a5a8a8;

.topcoat-button.is-active {
  background-color: #404141;
  -webkit-box-shadow: inset 0 1px rgba(0,0,0,0.18);
  box-shadow: inset 0 1px rgba(0,0,0,0.18);

.topcoat-button.is-active {
  background-color: #d3d7d7;
  -webkit-box-shadow: inset 0 1px rgba(0,0,0,0.12);
  box-shadow: inset 0 1px rgba(0,0,0,0.12);

.topcoat-button.is-disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
Loading ..................