UNPKG

barecss

Version:

A classless CSS framework http://barecss.com

79 lines (64 loc) 1.49 kB
@import (reference) "_variables"; /* buttons ----------------------------------------------------------------------*/ button@{n}, button@{x}, input[type=submit], [btn] { // normal button styling cursor: pointer; color: @primary; display: inline-block; padding: 1.4rem 2rem; background: #fff; border: 1px solid @primary; border-radius: 2px; box-shadow: 0 0 0 rgba(0,0,0,0); text-transform: uppercase; text-decoration: none; text-align: center; font-size: @fs-s; font-weight: 700; line-height: 1rem; margin: 0 1rem 1rem 0; -webkit-appearance: none; &:before { content: ""; position: absolute; z-index: -1; opacity: 0; width: 100%; height: 100%; left: 0; top: 0; transform: scale3d(1.2,1.2,1.2); background: @primary; } &:not(:disabled):hover { box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); background: @grey-ultralight; &:active { box-shadow: none; transition: none; } } // primary button styling &[primary] { border-color: darken(@primary, 6%); background: @primary; color: @primary--; font-weight: 700; &:not(:disabled):hover { background: darken(@primary, 6%) } } &[round] { border-radius: 4rem; } &[m-full] { @media (max-width: @mobile) { width: 100% } } // disabled button styling &:disabled, &.disabled { border-color: @grey-light; background: @grey-light; color: @grey-mid; cursor: default; } }