// Button related variable %btn-link-active { color: $blue; background-color: transparent; border-color: transparent; } %btn-ghost { color: $secondary; background-color: transparent; border: 1px solid transparent; &:not(:disabled):not(.disabled):hover { background-color: $cloud; border-color: $cloud; } &:not(:disabled):not(.disabled):focus { background-color: transparent; border-color: $blue; box-shadow: 0 0 4px 1px $blue; } } $btn-basic-border-color: $smoke; // End of button related variable .#{$prefix}btn { &.#{$prefix}btn-basic { color: $secondary; background-color: $light; border: 1px solid $btn-basic-border-color; &:not(:disabled):not(.disabled):hover { border-color: $sapphire; } &:not(:disabled):not(.disabled):focus { border-color: $sapphire; box-shadow: 0 0 4px 1px $sapphire; } } &.#{$prefix}btn-ghost { @extend %btn-ghost; &:not(:disabled):not(.disabled):focus { background-color: transparent; border-color: $primary; box-shadow: 0 0 4px 1px $primary; } } &.#{$prefix}btn-link { padding: 0; @extend %btn-link-active; &:not(:disabled):not(.disabled):active { @extend %btn-link-active; } &:not(:disabled):not(.disabled):focus { text-decoration: none; box-shadow: 0 0 4px 1px $blue; } &:disabled, &.disabled { text-decoration: none; pointer-events: auto; background-color: transparent; border: none; } } &.#{$prefix}btn-primary { &.#{$prefix}btn-with-icon { .ic { &::before { // stylelint-disable-next-line declaration-no-important color: $white !important; } } } } &.#{$prefix}btn-icon { width: 36px; height: 36px; padding: 8px; @extend %btn-ghost; > .ic { width: 16px; height: 16px; padding: 0; font-size: 16px; } } &.#{$prefix}is-loading { position: relative; pointer-events: none; &::before { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 3; content: ""; background-color: inherit; // stylelint-disable-next-line property-blacklist border-radius: 4px; } &::after { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 4; display: inline-block; width: 20px; height: 20px; margin: auto; content: ""; background: center center no-repeat; background-size: cover; border: 2px solid $white; border-right-color: transparent; // stylelint-disable-next-line property-blacklist border-radius: 50%; animation: spinner-border .75s linear infinite; } &.#{$prefix}btn-basic { &::after { border-color: $secondary; border-right-color: transparent; } } &.#{$prefix}btn-ghost { color: transparent; &::after { border-color: $secondary; border-right-color: transparent; } } } &.#{$prefix}btn-with-icon { .ic { padding: 0; font-size: 20px; vertical-align: top; border: none; &.is-left { margin-right: 8px; } &.is-right { margin-left: 8px; } } span { padding: 2px 0; vertical-align: top; border: none; } &.#{$prefix}btn-sm { .ic { padding: 0; font-size: 16px; vertical-align: text-top; border: none; } span { padding: 0; line-height: 16px; vertical-align: text-top; border: none; } } &.#{$prefix}btn-lg { .ic { padding: 0; font-size: 24px; vertical-align: top; border: none; } span { padding: 3px 0; font-size: 18px; vertical-align: top; border: none; } } } &.disabled, &:disabled { color: $text-muted; cursor: not-allowed; background-color: $cloud; border: 1px solid $cloud; opacity: 1; &.#{$prefix}btn-ghost { background-color: transparent; border-color: transparent; } } // Caret &.#{$prefix}dropdown-toggle { &::before { margin-right: 16px; } &::after { margin-left: 16px; } } // Button group &-group { .#{$prefix}btn:first-child:not(:only-child):not(.#{$prefix}dropdown-toggle) { padding-right: 8px; } .#{$prefix}btn:last-child:not(:only-child) { padding-left: 8px; } // Caret .#{$prefix}dropdown-toggle-split { min-width: 36px; padding-right: 8px; padding-left: 8px; &::before { margin-right: 0; } &::after { margin-left: 0; } // Button basic &.#{$prefix}btn-basic:not(:hover):not(:focus) { padding-left: 9px; border-left: none; } } // Button basic &.#{$prefix}dropleft { .#{$prefix}dropdown-toggle-split { &.#{$prefix}btn-basic:not(:hover):not(:focus) { padding-left: 8px; border-left: 1px solid $btn-basic-border-color; } } ~ .#{$prefix}btn-basic:not(:hover):not(:focus) { padding-left: 9px; border-left: none; } } // Button link active &.show { > .#{$prefix}btn-link { @extend %btn-link-active; } } } }