grafana/public/sass/components/_buttons.scss

123 lines
2.7 KiB
SCSS
Raw Normal View History

2016-02-15 08:27:41 -06:00
//
// Buttons
// --------------------------------------------------
// Base styles
// --------------------------------------------------
// Core
.btn {
display: inline-block;
font-weight: $btn-font-weight;
line-height: $btn-line-height;
2016-02-16 03:42:06 -06:00
font-size: $font-size-base;
2016-02-15 08:27:41 -06:00
text-align: center;
vertical-align: middle;
cursor: pointer;
border: $input-btn-border-width solid transparent;
2016-02-15 08:27:41 -06:00
@include button-size($btn-padding-y, $btn-padding-x, $font-size-base, $btn-border-radius);
2016-02-15 08:27:41 -06:00
&,
&:active,
&.active {
&:focus,
&.focus {
@include tab-focus();
}
2016-02-15 08:27:41 -06:00
}
@include hover-focus {
text-decoration: none;
}
&.focus {
text-decoration: none;
2016-02-15 08:27:41 -06:00
}
&:active,
&.active {
2016-02-15 08:27:41 -06:00
background-image: none;
outline: 0;
2016-02-15 08:27:41 -06:00
}
&.disabled,
&:disabled {
cursor: $cursor-disabled;
opacity: .65;
@include box-shadow(none);
2016-02-15 08:27:41 -06:00
}
}
// Button Sizes
// --------------------------------------------------
// Large
.btn-large {
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $font-size-lg, $btn-border-radius);
2016-02-15 08:27:41 -06:00
}
.btn-small {
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $font-size-sm, $btn-border-radius);
2016-02-15 08:27:41 -06:00
}
.btn-mini {
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $font-size-xs, $btn-border-radius);
2016-02-15 08:27:41 -06:00
}
2016-02-19 07:21:57 -06:00
.btn-link {
2016-02-20 04:05:06 -06:00
color: $btn-link-color;
2016-02-19 07:21:57 -06:00
}
2016-02-15 08:27:41 -06:00
// Set the backgrounds
// -------------------------
.btn-primary {
@include buttonBackground($btn-primary-bg, $btn-primary-bg-hl);
2016-02-15 08:27:41 -06:00
}
.btn-secondary {
@include buttonBackground($btn-secondary-bg, $btn-secondary-bg-hl);
}
2016-02-15 08:27:41 -06:00
// Warning appears are orange
.btn-warning {
2016-02-19 07:21:57 -06:00
@include buttonBackground($btn-warning-bg, $btn-warning-bg-hl);
2016-02-15 08:27:41 -06:00
}
// Danger and error appear as red
.btn-danger {
2016-02-19 07:21:57 -06:00
@include buttonBackground($btn-danger-bg, $btn-danger-bg-hl);
2016-02-15 08:27:41 -06:00
}
// Success appears as green
.btn-success {
2016-02-19 07:21:57 -06:00
@include buttonBackground($btn-success-bg, $btn-success-bg-hl);
2016-02-15 08:27:41 -06:00
}
// Info appears as a neutral blue
2016-02-20 04:05:06 -06:00
.btn-secondary {
@include buttonBackground($btn-secondary-bg, $btn-secondary-bg-hl);
2016-02-15 08:27:41 -06:00
}
// Inverse appears as dark gray
.btn-inverse {
2016-02-19 07:21:57 -06:00
@include buttonBackground($btn-inverse-bg, $btn-inverse-bg-hl, $btn-inverse-text-color);
//background: $card-background;
box-shadow: $card-shadow;
//border: 1px solid $tight-form-func-highlight-bg;
2016-02-15 08:27:41 -06:00
}
.btn-outline-primary {
@include button-outline-variant($btn-primary-bg);
}
.btn-outline-secondary {
2016-02-20 04:05:06 -06:00
@include button-outline-variant($btn-secondary-bg);
}
2016-02-20 04:05:06 -06:00
.btn-outline-inverse {
@include button-outline-variant($btn-inverse-bg);
}
.btn-outline-success {
2016-02-19 07:21:57 -06:00
@include button-outline-variant($btn-success-bg);
}
.btn-outline-warning {
2016-02-19 07:21:57 -06:00
@include button-outline-variant($btn-warning-bg);
}
.btn-outline-danger {
2016-02-19 07:21:57 -06:00
@include button-outline-variant($btn-danger-bg);
}
2016-02-19 07:21:57 -06:00