buttons.scss 2.99 KB
Newer Older
1
@mixin btn-default {
Andrey's avatar
Andrey committed
2 3 4 5 6 7 8 9 10
  @include border-radius(2px);
  border-width: 1px;
  border-style: solid;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  padding: 11px 16px;
  letter-spacing: .4px;
11

12
  &:focus,
Andrey's avatar
Andrey committed
13
  &:active {
14
    outline: none;
Andrey's avatar
Andrey committed
15 16 17 18 19
    @include box-shadow(inset 0 0 4px rgba(0, 0, 0, 0.12));
  }
}

@mixin btn-middle {
20
  @include btn-default;
Andrey's avatar
Andrey committed
21 22 23 24
  @include border-radius(2px);
  padding: 11px 24px;
}

25 26 27 28
@mixin btn-color($light, $border-light, $normal, $border-normal, $dark, $border-dark, $color) {
  background-color: $light;
  border-color: $border-light;
  color: $color;
Andrey's avatar
Andrey committed
29

30
  &:hover,
31
  &:focus {
32 33 34
    background-color: $normal;
    border-color: $border-normal;
    color: $color;
35 36 37 38 39
  }

  &:active {
    @include box-shadow (inset 0 0 4px rgba(0, 0, 0, 0.12));

40 41 42
    background-color: $dark;
    border-color: $border-dark;
    color: $color;
43 44
  }
}
Andrey's avatar
Andrey committed
45

46 47
@mixin btn-green {
  @include btn-color($green-light, $border-green-light, $green-normal, $border-green-normal, $green-dark, $border-green-dark, #FFFFFF);
48 49
}

50 51 52
@mixin btn-blue {
  @include btn-color($blue-light, $border-blue-light, $blue-normal, $border-blue-normal, $blue-dark, $border-blue-dark, #FFFFFF);
}
53

54 55
@mixin btn-orange {
  @include btn-color($orange-light, $border-orange-light, $orange-normal, $border-orange-normal, $orange-dark, $border-orange-dark, #FFFFFF);
Andrey's avatar
Andrey committed
56 57
}

58
@mixin btn-red {
59 60
  @include btn-color($red-light, $border-red-light, $red-normal, $border-red-normal, $red-dark, $border-red-dark, #FFFFFF);
}
61

62 63 64
@mixin btn-gray {
  @include btn-color($gray-light, $border-gray-light, $gray-normal, $border-gray-normal, $gray-dark, $border-gray-dark, #313236);
}
65

66 67
@mixin btn-white {
  @include btn-color($white-light, $border-white-light, $white-normal, $border-white-normal, $white-dark, $border-white-dark, #313236);
68 69
}

70
.btn {
71
  @include btn-default;
72
  @include btn-white;
73

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
74 75 76 77 78
  &.btn-success,
  &.btn-new,
  &.btn-create,
  &.btn-save,
  &.btn-green {
79 80
    @include btn-green;
  }
81

82 83 84
  &.btn-gray {
    @include btn-gray;
  }
85

86 87 88 89 90 91 92 93 94
  &.btn-primary,
  &.btn-info {
    @include btn-blue;
  }

  &.btn-warning {
    @include btn-orange;
  }

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
95 96 97 98
  &.btn-danger,
  &.btn-remove,
  &.btn-red {
    @include btn-red;
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
  }

  &.btn-cancel {
    float: right;
  }

  &.btn-close {
    color: $gl-danger;
    border-color: $gl-danger;
    &:hover {
      color: #B94A48;
    }
  }

  &.btn-reopen {
    color: $gl-success;
    border-color: $gl-success;
    &:hover {
      color: #468847;
    }
  }

  &.btn-grouped {
    margin-right: 7px;
    float: left;
    &:last-child {
      margin-right: 0px;
    }
  }
}

.btn-block {
  width: 100%;
  margin: 0;
  margin-bottom: 15px;
  &.btn {
    padding: 6px 0;
  }
}

.btn-group {
  &.btn-grouped {
    margin-right: 7px;
    float: left;
    &:last-child {
      margin-right: 0px;
    }
  }
}

.btn-group-next {
  .btn {
    padding: 9px 0px;
    font-size: 15px;
    color: #7f8fa4;
    border-color: #e7e9ed;
    width: 140px;

    &.active {
      border-color: $gl-info;
      background: $gl-info;
      color: #fff;
    }
  }
163
}