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

261 lines
4.4 KiB
SCSS
Raw Normal View History

2015-10-24 18:46:33 +05:30
@mixin btn-default {
@include 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;
@include box-shadow($gl-btn-active-background);
2015-10-24 18:46:33 +05:30
}
}
@mixin btn-middle {
@include btn-default;
}
@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 {
@include box-shadow ($gl-btn-active-background);
2015-10-24 18:46:33 +05:30
background-color: $dark;
border-color: $border-dark;
color: $color;
}
}
@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
}
.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;
}
&.btn-gray {
@include btn-gray;
}
&.btn-primary {
@include btn-blue-medium;
}
2015-10-24 18:46:33 +05:30
&.btn-info {
@include btn-blue;
}
&.btn-close,
2015-10-24 18:46:33 +05:30
&.btn-warning {
@include btn-orange;
}
&.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 {
margin-right: 7px;
float: left;
&:last-child {
2016-06-02 11:05:42 +05:30
margin-right: 0;
2015-10-24 18:46:33 +05:30
}
&.btn-xs {
margin-right: 3px;
}
}
&.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;
}
.caret {
margin-left: 5px;
}
}
.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;
&.btn {
padding: 6px 0;
}
}
.btn-group {
&.btn-grouped {
margin-right: 7px;
float: left;
&:last-child {
2016-06-02 11:05:42 +05:30
margin-right: 0;
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-06-02 11:05:42 +05:30
@include 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;
i {
color: $gl-icon-color;
}
}