|
20 | 20 | @return true; |
21 | 21 | } |
22 | 22 | } |
23 | | -@mixin button-variant($color, $background, $border, $important: false) { |
| 23 | +/* @mixin button-variant($color, $background, $border, $important: false) { |
24 | 24 | background-image: none important($important); |
25 | 25 | margin-bottom: 0; // For input.btn |
26 | 26 | padding: 6px 20px important($important); |
|
78 | 78 | } |
79 | 79 | } |
80 | 80 | } |
| 81 | +}*/ |
| 82 | + |
| 83 | +@mixin button-variant($color, $background, $border, $important: false) { |
| 84 | + background-image: none important($important); |
| 85 | + margin-bottom: 0; // For input.btn |
| 86 | + border-radius: $btn-border-radius-base important($important); |
| 87 | + color: $color important($important); |
| 88 | + background-color: $background important($important); |
| 89 | + border: 1px solid $border important($important); |
| 90 | + background-clip: padding-box; |
| 91 | + -webkit-appearance: none; |
| 92 | + &:focus, |
| 93 | + &.focus, |
| 94 | + &:hover { |
| 95 | + color: $color important($important); |
| 96 | + @if $background == $white { |
| 97 | + background-color: $gray-lightest important($important); |
| 98 | + border-color: $border important($important); |
| 99 | + } @else { |
| 100 | + background-color: $background important($important); |
| 101 | + border-color: $border important($important); |
| 102 | + filter: opacity(0.7) important($important); |
| 103 | + // Strange: removing opacity(1.) or correcting it makes item transparent |
| 104 | + } |
| 105 | + text-decoration: none important($important); |
| 106 | + } |
| 107 | + &:active, |
| 108 | + &.cms-btn-active { |
| 109 | + color: $color important($important); |
| 110 | + background-color: $background important($important); |
| 111 | + border-color: $border important($important); |
| 112 | + filter: brightness(var(--active-brightness)) opacity(1) important($important); |
| 113 | + // Strange: removing opacity(1.) or correcting it makes item transparent |
| 114 | + box-shadow: $btn-active-shadow important($important); |
| 115 | + |
| 116 | + &:hover, |
| 117 | + &:focus, |
| 118 | + &.focus { |
| 119 | + color: $color important($important); |
| 120 | + background-color: $background important($important); |
| 121 | + border-color: $border important($important); |
| 122 | + filter: brightness(calc(var(--focus-brightness) * var(--active-brightness))) opacity(1) important($important); |
| 123 | + } // Strange: removing opacity(1.) or correcting it makes item transparent |
| 124 | + } |
| 125 | + &:active, |
| 126 | + &.cms-btn-active { |
| 127 | + background-image: none important($important); |
| 128 | + } |
| 129 | + &.cms-btn-disabled, |
| 130 | + &[disabled] { |
| 131 | + &, |
| 132 | + &:hover, |
| 133 | + &:focus, |
| 134 | + &.focus, |
| 135 | + &:active, |
| 136 | + &.cms-btn-active { // TODO: FABR |
| 137 | + background-color: $background important($important); |
| 138 | + border-color: $border important($important); |
| 139 | + @if $color == $gray { |
| 140 | + color: $gray-lighter important(1); |
| 141 | + } @else { |
| 142 | + color: $color important(1); |
| 143 | + filter: brightness(0.6) opacity(1); // Strange: removing opacity(1.) or correcting it makes item transparent |
| 144 | + } |
| 145 | + cursor: not-allowed; |
| 146 | + box-shadow: none important($important); |
| 147 | + &:before { |
| 148 | + @if $color == $gray { |
| 149 | + color: $gray-lighter important(1); |
| 150 | + } @else { |
| 151 | + color: $color important(1); |
| 152 | + filter: brightness(0.6) opacity(1); // Strange: removing opacity(1.) or correcting it makes item transparent |
| 153 | + } |
| 154 | + } |
| 155 | + } |
| 156 | + } |
81 | 157 | } |
0 commit comments