/// /// Hypothesis by Pixelarity /// pixelarity.com | hello@pixelarity.com /// License: pixelarity.com/license /// /* Button */ input[type="submit"], input[type="reset"], input[type="button"], button, .button { @include vendor('appearance', 'none'); @include vendor('transition', 'background-color #{_duration(transition)} ease-in-out, color #{_duration(transition)} ease-in-out'); border-radius: _size(border-radius); border: 0; cursor: pointer; display: inline-block; font-weight: _font(weight-extrabold); height: _size(element-height); line-height: _size(element-height); border-radius: _size(element-height); padding: 0 1.625rem; text-align: center; text-decoration: none; white-space: nowrap; font-size: 0.875rem; outline: 0; &.icon { &:before { margin-right: 0.5rem; } } &.fit { display: block; margin: 0 0 (_size(element-margin) * 0.5) 0; width: 100%; } &.small { font-size: 0.7rem; height: _size(element-height) * 0.75; line-height: _size(element-height) * 0.75; border-radius: _size(element-height) * 0.75; padding: 0 1.25rem; } &.big { font-size: 1rem; height: _size(element-height) * 1.25; line-height: _size(element-height) * 1.25; border-radius: _size(element-height) * 1.25; padding: 0 2rem; } &.wide { min-width: 12rem; } &.disabled, &:disabled { @include vendor('pointer-events', 'none'); opacity: 0.25; } } @mixin color-button($p: null) { input[type="submit"], input[type="reset"], input[type="button"], button, .button { background-color: transparent; @if ($p != null) { box-shadow: inset 0 0 0 3px _palette($p, fg-bold); color: _palette($p, fg-bold) !important; &:hover { background-color: transparentize(_palette($p, fg-bold), 0.9); &:active { background-color: transparentize(_palette($p, fg-bold), 0.75); } } &.special { background-color: _palette($p, fg-bold); box-shadow: none; color: _palette($p, bg) !important; &:hover { background-color: transparentize(_palette($p, fg-bold), 0.1); } &:active { background-color: transparentize(_palette($p, fg-bold), 0.25); } } } @else { box-shadow: inset 0 0 0 3px _palette(accent1, bg); color: _palette(accent1, bg) !important; &:hover { background-color: transparentize(_palette(accent1, bg), 0.9); &:active { background-color: transparentize(_palette(accent1, bg), 0.75); } } &.special { background-color: _palette(accent1, bg); box-shadow: none; color: _palette(accent1, fg-bold) !important; &:hover { background-color: lighten(_palette(accent1, bg), 8); } &:active { background-color: darken(_palette(accent1, bg), 6); } } } } } @include color-button;