info@53: // info@53: // Buttons info@53: // -------------------------------------------------- info@53: info@53: info@53: // Base styles info@53: // -------------------------------------------------- info@53: info@53: .btn { info@53: display: inline-block; info@53: margin-bottom: 0; // For input.btn info@53: font-weight: @btn-font-weight; info@53: text-align: center; info@53: vertical-align: middle; info@53: cursor: pointer; info@53: background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 info@53: border: 1px solid transparent; info@53: white-space: nowrap; info@53: .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base); info@53: .user-select(none); info@53: info@53: &:focus { info@53: .tab-focus(); info@53: } info@53: info@53: &:hover, info@53: &:focus { info@53: color: @btn-default-color; info@53: text-decoration: none; info@53: } info@53: info@53: &:active, info@53: &.active { info@53: outline: 0; info@53: background-image: none; info@53: .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); info@53: } info@53: info@53: &.disabled, info@53: &[disabled], info@53: fieldset[disabled] & { info@53: cursor: not-allowed; info@53: pointer-events: none; // Future-proof disabling of clicks info@53: .opacity(.65); info@53: .box-shadow(none); info@53: } info@53: } info@53: info@53: info@53: // Alternate buttons info@53: // -------------------------------------------------- info@53: info@53: .btn-default { info@53: .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border); info@53: } info@53: .btn-primary { info@53: .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border); info@53: } info@53: // Warning appears as orange info@53: .btn-warning { info@53: .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border); info@53: } info@53: // Danger and error appear as red info@53: .btn-danger { info@53: .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border); info@53: } info@53: // Success appears as green info@53: .btn-success { info@53: .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border); info@53: } info@53: // Info appears as blue-green info@53: .btn-info { info@53: .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border); info@53: } info@53: info@53: info@53: // Link buttons info@53: // ------------------------- info@53: info@53: // Make a button look and behave like a link info@53: .btn-link { info@53: color: @link-color; info@53: font-weight: normal; info@53: cursor: pointer; info@53: border-radius: 0; info@53: info@53: &, info@53: &:active, info@53: &[disabled], info@53: fieldset[disabled] & { info@53: background-color: transparent; info@53: .box-shadow(none); info@53: } info@53: &, info@53: &:hover, info@53: &:focus, info@53: &:active { info@53: border-color: transparent; info@53: } info@53: &:hover, info@53: &:focus { info@53: color: @link-hover-color; info@53: text-decoration: underline; info@53: background-color: transparent; info@53: } info@53: &[disabled], info@53: fieldset[disabled] & { info@53: &:hover, info@53: &:focus { info@53: color: @btn-link-disabled-color; info@53: text-decoration: none; info@53: } info@53: } info@53: } info@53: info@53: info@53: // Button Sizes info@53: // -------------------------------------------------- info@53: info@53: .btn-lg { info@53: // line-height: ensure even-numbered height of button next to large input info@53: .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large); info@53: } info@53: .btn-sm { info@53: // line-height: ensure proper height of button next to small input info@53: .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small); info@53: } info@53: .btn-xs { info@53: .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small); info@53: } info@53: info@53: info@53: // Block button info@53: // -------------------------------------------------- info@53: info@53: .btn-block { info@53: display: block; info@53: width: 100%; info@53: padding-left: 0; info@53: padding-right: 0; info@53: } info@53: info@53: // Vertically space out multiple block buttons info@53: .btn-block + .btn-block { info@53: margin-top: 5px; info@53: } info@53: info@53: // Specificity overrides info@53: input[type="submit"], info@53: input[type="reset"], info@53: input[type="button"] { info@53: &.btn-block { info@53: width: 100%; info@53: } info@53: }