button, input[type="submit"], a.button, input.button { @include button-defaults; position: relative; &.secondary { background-color: $secondary-button-bg-color; color: $secondary-button-text-color; border-color: $secondary-button-border-color; &:focus { @include default-focus-style( $border-color: $button-focus-border-color, $box-shadow: $button-focus-box-shadow ); } &:active, &:active:focus { border-color: $button-hover-border-color; box-shadow: none; } } &.small { padding: $default-padding 3*$default-padding; vertical-align: inherit; line-height: 4*$default-padding; font-size: inherit; } &.with_icon .icon { position: relative; top: -1px; margin-right: 2 * $default-margin; color: inherit; } } .icon_button { width: 27px; height: 27px; line-height: 21px; margin: 0; padding: 3px; overflow: hidden; text-align: center; text-shadow: none; border-radius: $default-border-radius; img { position: absolute; top: 2px; left: 3px; } &.small { width: 15px; height: 15px; padding: 0; float: none; display: inline-block; vertical-align: middle; position: relative; top: 0px; background: none; border: none; .icon { position: absolute; top: 50%; transform: translateX(-50%) translateY(-50%); transition: color 250ms; } &:hover { border: $default-border-width $default-border-style $icon-color; color: $icon-color; .icon { color: inherit } } } &.disabled { span { opacity: 0.3; cursor: not-allowed; } &:hover { cursor: not-allowed; } } &.linked { @include linked-button; } &:focus { @include default-focus-style; } } button.icon_button { background: transparent; border: 0 none; box-shadow: none; &:disabled, &.disabled { background: transparent; } } #new_element button.button { float: right; } .button_with_label { position: relative; display: inline-block; text-align: center; margin: 0 2*$default-margin; &.active, &:active, &:hover { .icon_button { background-color: $default-border-color; cursor: pointer; } } .select2-container, select { margin: 0; top: 0; } .icon_button { float: none; margin-right: auto; margin-left: auto; display: inline-block; vertical-align: middle; position: relative; } &.disabled { opacity: 0.5; cursor: default; } } .button_with_label, .button_group { .icon_button { width: 29px; height: 29px; line-height: 24px; } label { border-radius: $default-border-radius; position: absolute; visibility: hidden; top: -20px; left: 50%; margin-left: -13px; z-index: 30; background-color: $tooltip-background-color; color: $white; padding: $default-padding 2*$default-padding 1.5*$default-padding; line-height: 1; box-shadow: 0 0 4px $default-border-color; white-space: nowrap; pointer-events: none; opacity: 0; transition: .3s; &:before { content: ''; position: absolute; bottom: -10px; left: 8px; border: 5px transparent solid; border-top-color: $tooltip-background-color; } &.center { left: auto; right: 50%; margin-left: 0; transform: translateX(50%); &:before { left: auto; right: 50%; transform: translateX(50%); } } &.left { left: auto; right: 50%; margin-left: 0; margin-right: -13px; &:before { left: auto; right: 8px; } } &.right-aligned { left: auto; margin-left: auto; right: 50%; margin-right: -13px; &:before { left: auto; right: 8px; } } } &:hover label { visibility: visible; opacity: 1; top: -25px; transition-delay: .2s; } }