Button Pal

You get so much for free when you use a real button, so here's a block of CSS to remove the headache of styling them for you. Read more about why you should use a button here.

The button

Check out this totally workable button. It's pretty much as easy to work with as a <div>. You can share these styles with an <a> too 🚀

The code

button {
    display: inline-block;
    border: none;
    padding: 1rem 2rem;
    margin: 0;
    text-decoration: none;
    background: #0069ed;
    color: #ffffff;
    font-family: sans-serif;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    transition: background 250ms ease-in-out, 
                transform 150ms ease;
    -webkit-appearance: none;
    -moz-appearance: none;
}

button:hover,
button:focus {
    background: #0053ba;
}

button:focus {
    outline: 1px solid #fff;
    outline-offset: -4px;
}

button:active {
    transform: scale(0.99);
}