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