| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- //
- // Buttons
- // --------------------------------------------------
- // Base styles
- // --------------------------------------------------
- // Core
- .btn {
- display: inline-block;
- padding: 8px 12px;
- margin-right: 10px;
- font-size: $baseFontSize;
- line-height: $baseLineHeight;
- text-align: center;
- vertical-align: middle;
- cursor: pointer;
- border: none;
- @include buttonBackground($btnBackground, $btnBackgroundHighlight, $grayDark, 0 1px 1px rgba(255,255,255,.75));
- @include box-shadow("inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
- // Hover/focus state
- &:hover,
- &:focus {
- text-decoration: none;
- }
- // Focus state for keyboard and accessibility
- &:focus {
- @include tab-focus();
- }
- // Active state
- &.active,
- &:active {
- background-image: none;
- }
- // Disabled state
- &.disabled,
- &[disabled] {
- cursor: default;
- background-image: none;
- @include opacity(65);
- }
- }
- // Button Sizes
- // --------------------------------------------------
- // Large
- .btn-large {
- padding: 6px 20px;
- font-size: $fontSizeLarge;
- }
- .btn-small {
- padding: 2px 10px;
- font-size: $fontSizeSmall;
- }
- .btn-mini {
- padding: 2px 6px;
- margin-right: 0;
- margin-right: 0;
- font-size: $fontSizeMini;
- }
- // Set the backgrounds
- // -------------------------
- .btn-primary {
- @include buttonBackground($btnPrimaryBackground, $btnPrimaryBackgroundHighlight);
- }
- // Warning appears are orange
- .btn-warning {
- @include buttonBackground($btnWarningBackground, $btnWarningBackgroundHighlight);
- }
- // Danger and error appear as red
- .btn-danger {
- @include buttonBackground($btnDangerBackground, $btnDangerBackgroundHighlight);
- }
- // Success appears as green
- .btn-success {
- @include buttonBackground($btnSuccessBackground, $btnSuccessBackgroundHighlight);
- }
- // Info appears as a neutral blue
- .btn-info {
- @include buttonBackground($btnInfoBackground, $btnInfoBackgroundHighlight);
- }
- // Inverse appears as dark gray
- .btn-inverse {
- @include buttonBackground($btnInverseBackground, $btnInverseBackgroundHighlight, $btnInverseText);
- box-shadow: none;
- border: 1px solid $grafanaTargetFuncHightlight;
- }
- .btn-text {
- color: $btnText;
- margin: 0;
- vertical-align: middle;
- }
|