debian-mirror-gitlab/app/assets/stylesheets/framework/buttons.scss

357 lines
6 KiB
SCSS
Raw Normal View History

2015-10-24 18:46:33 +05:30
@mixin btn-default {
2016-11-03 12:29:30 +05:30
border-radius: 3px;
font-size: $gl-font-size;
font-weight: 500;
2016-04-02 18:10:28 +05:30
padding: $gl-vert-padding $gl-btn-padding;
2015-10-24 18:46:33 +05:30
&:focus,
&:active {
outline: none;
2016-06-02 11:05:42 +05:30
background-color: $btn-active-gray;
2016-11-03 12:29:30 +05:30
box-shadow: $gl-btn-active-background;
2015-10-24 18:46:33 +05:30
}
}
@mixin btn-middle {
@include btn-default;
}
@mixin btn-outline($background, $text, $border, $hover-background, $hover-text, $hover-border) {
background-color: $background;
color: $text;
border-color: $border;
&:hover,
&:focus {
background-color: $hover-background;
color: $hover-text;
2016-11-03 12:29:30 +05:30
border-color: $hover-border;
}
}
2015-10-24 18:46:33 +05:30
@mixin btn-color($light, $border-light, $normal, $border-normal, $dark, $border-dark, $color) {
background-color: $light;
border-color: $border-light;
color: $color;
&:hover,
&:focus {
background-color: $normal;
border-color: $border-normal;
color: $color;
}
2016-06-02 11:05:42 +05:30
&:active,
&.active {
2016-11-03 12:29:30 +05:30
box-shadow: $gl-btn-active-background;
2015-10-24 18:46:33 +05:30
background-color: $dark;
border-color: $border-dark;
color: $color;
}
2016-08-24 12:49:21 +05:30
svg {
path {
fill: $color;
}
use {
stroke: $color;
}
}
2015-10-24 18:46:33 +05:30
}
@mixin btn-green {
2016-06-02 11:05:42 +05:30
@include btn-color($green-light, $border-green-light, $green-normal, $border-green-normal, $green-dark, $border-green-dark, #fff);
2015-10-24 18:46:33 +05:30
}
@mixin btn-blue {
2016-06-02 11:05:42 +05:30
@include btn-color($blue-light, $border-blue-light, $blue-normal, $border-blue-normal, $blue-dark, $border-blue-dark, #fff);
2015-10-24 18:46:33 +05:30
}
@mixin btn-blue-medium {
2016-06-02 11:05:42 +05:30
@include btn-color($blue-medium-light, $border-blue-light, $blue-medium, $border-blue-normal, $blue-medium-dark, $border-blue-dark, #fff);
}
2015-10-24 18:46:33 +05:30
@mixin btn-orange {
2016-06-02 11:05:42 +05:30
@include btn-color($orange-light, $border-orange-light, $orange-normal, $border-orange-normal, $orange-dark, $border-orange-dark, #fff);
2015-10-24 18:46:33 +05:30
}
@mixin btn-red {
2016-06-02 11:05:42 +05:30
@include btn-color($red-light, $border-red-light, $red-normal, $border-red-normal, $red-dark, $border-red-dark, #fff);
2015-10-24 18:46:33 +05:30
}
@mixin btn-gray {
2016-06-02 11:05:42 +05:30
@include btn-color($gray-light, $border-gray-light, $gray-normal, $border-gray-light, $gray-dark, $border-gray-dark, $gl-gray-dark);
2015-10-24 18:46:33 +05:30
}
@mixin btn-white {
2016-06-02 11:05:42 +05:30
@include btn-color($white-light, $border-color, $white-normal, $border-white-normal, $white-dark, $border-white-dark, $btn-white-active);
2015-10-24 18:46:33 +05:30
}
@mixin btn-with-margin {
margin-left: $btn-side-margin;
float: left;
&.inline {
float: none;
}
&.btn-sm {
margin-left: $btn-sm-side-margin;
}
&.btn-xs {
margin-left: $btn-xs-side-margin;
}
}
2015-10-24 18:46:33 +05:30
.btn {
@include btn-default;
@include btn-white;
2016-06-02 11:05:42 +05:30
color: $gl-text-color;
&:focus:active {
outline: 0;
}
&.btn-small,
2015-10-24 18:46:33 +05:30
&.btn-sm {
padding: 4px 10px;
font-size: 13px;
line-height: 18px;
}
2015-10-24 18:46:33 +05:30
&.btn-xs {
padding: 2px 5px;
2015-10-24 18:46:33 +05:30
}
&.btn-success,
&.btn-new,
&.btn-create,
2016-04-02 18:10:28 +05:30
&.btn-save {
2015-10-24 18:46:33 +05:30
@include btn-green;
}
2016-09-13 17:45:13 +05:30
&.btn-inverted {
&.btn-success,
&.btn-new,
&.btn-create,
&.btn-save {
@include btn-outline($white-light, $green-normal, $green-normal, $green-light, $white-light, $green-light);
}
}
2015-10-24 18:46:33 +05:30
&.btn-gray {
@include btn-gray;
}
&.btn-primary {
@include btn-blue-medium;
}
2016-11-03 12:29:30 +05:30
&.btn-info,
&.btn-register {
2015-10-24 18:46:33 +05:30
@include btn-blue;
}
&.btn-warning {
@include btn-orange;
}
&.btn-close {
@include btn-outline($white-light, $orange-normal, $orange-normal, $orange-light, $white-light, $orange-light);
}
2016-09-13 17:45:13 +05:30
&.btn-spam {
@include btn-outline($white-light, $red-normal, $red-normal, $red-light, $white-light, $red-light);
}
2015-10-24 18:46:33 +05:30
&.btn-danger,
&.btn-remove,
&.btn-red {
@include btn-red;
}
&.btn-cancel {
float: right;
}
&.btn-reopen {
/* should be same as parent class for now */
2015-10-24 18:46:33 +05:30
}
&.btn-grouped {
@include btn-with-margin;
}
&.disabled {
pointer-events: auto !important;
2015-10-24 18:46:33 +05:30
}
2016-06-02 11:05:42 +05:30
&[disabled] {
pointer-events: none !important;
}
2016-11-03 12:29:30 +05:30
.fa-caret-down,
.fa-caret-up {
2016-06-02 11:05:42 +05:30
margin-left: 5px;
}
2016-08-24 12:49:21 +05:30
2016-11-03 12:29:30 +05:30
&.dropdown-toggle {
.fa-caret-down {
margin-left: 3px;
}
}
2016-08-24 12:49:21 +05:30
svg {
height: 15px;
2016-09-13 17:45:13 +05:30
width: 15px;
2016-08-24 12:49:21 +05:30
position: relative;
top: 2px;
}
2016-09-29 09:46:39 +05:30
svg, .fa {
&:not(:last-child) {
margin-right: 3px;
}
}
2016-06-02 11:05:42 +05:30
}
.btn-lg {
padding: 12px 20px;
}
.btn-transparent {
color: $btn-transparent-color;
background-color: transparent;
border: 0;
&:hover,
&:active,
&:focus {
background-color: transparent;
box-shadow: none;
}
2015-10-24 18:46:33 +05:30
}
.btn-block {
width: 100%;
margin: 0;
margin-bottom: 15px;
2016-11-03 12:29:30 +05:30
2015-10-24 18:46:33 +05:30
&.btn {
padding: 6px 0;
}
}
.btn-group {
&.btn-grouped {
@include btn-with-margin;
2015-10-24 18:46:33 +05:30
}
}
.btn-clipboard {
border: none;
padding: 0 5px;
}
.input-group-btn {
2015-10-24 18:46:33 +05:30
.btn {
@include btn-middle;
&:hover {
outline: none;
2015-11-26 14:37:03 +05:30
}
&:focus {
outline: none;
}
&:active {
outline: none;
}
2015-11-26 14:37:03 +05:30
&.btn-clipboard {
padding-left: 15px;
padding-right: 15px;
2015-10-24 18:46:33 +05:30
}
}
2015-11-26 14:37:03 +05:30
.active {
2016-11-03 12:29:30 +05:30
box-shadow: $gl-btn-active-background;
border: 1px solid #c6cacf !important;
background-color: #e4e7ed !important;
}
2015-11-26 14:37:03 +05:30
}
2016-06-02 11:05:42 +05:30
.btn-loading {
&:not(.disabled) .fa {
display: none;
}
.fa {
margin-right: 5px;
}
}
.btn-text-field {
width: 100%;
text-align: left;
padding: 6px 16px;
border-color: $border-color;
color: $btn-placeholder-gray;
background-color: $background-color;
&:hover,
&:active,
&:focus {
cursor: text;
box-shadow: none;
border-color: $border-color;
color: $btn-placeholder-gray;
background-color: $background-color;
}
}
.btn-file-option {
background: linear-gradient(180deg, $white-light 25%, $gray-light 100%);
}
.btn-build {
margin-left: 10px;
2016-11-03 12:29:30 +05:30
2016-06-02 11:05:42 +05:30
i {
color: $gl-icon-color;
}
}
2016-08-24 12:49:21 +05:30
.clone-dropdown-btn a {
color: $dropdown-link-color;
2016-11-03 12:29:30 +05:30
2016-08-24 12:49:21 +05:30
&:hover {
text-decoration: none;
}
}
.btn-static {
background-color: $background-color !important;
border: 1px solid lightgrey;
cursor: default;
2016-11-03 12:29:30 +05:30
2016-08-24 12:49:21 +05:30
&:active {
-moz-box-shadow: inset 0 0 0 white;
-webkit-box-shadow: inset 0 0 0 white;
box-shadow: inset 0 0 0 white;
}
}
2016-11-03 12:29:30 +05:30
@media (max-width: $screen-xs-max) {
.btn-wide-on-xs {
width: 100%;
}
}