|
60 | 60 |
|
61 | 61 | .ns-root #{if($compat, '&-aqua.btn', '&.-aqua')} { |
62 | 62 | @include colorize( |
63 | | - $background-color: aqua, |
64 | 63 | $border-color: aqua, |
65 | | - $alternate-color: aqua |
| 64 | + $color: aqua |
66 | 65 | ); |
| 66 | + |
| 67 | + #{if($compat, '&.btn-primary', '&.-primary')} { |
| 68 | + @include colorize( |
| 69 | + $alternate-color: aqua, |
| 70 | + $background-color: aqua |
| 71 | + ); |
| 72 | + } |
67 | 73 | } |
68 | 74 |
|
69 | 75 | .ns-root #{if($compat, '&-blue.btn', '&.-blue')} { |
70 | 76 | @include colorize( |
71 | | - $background-color: blue, |
72 | 77 | $border-color: blue, |
73 | | - $alternate-color: blue |
| 78 | + $color: blue |
74 | 79 | ); |
| 80 | + |
| 81 | + #{if($compat, '&.btn-primary', '&.-primary')} { |
| 82 | + @include colorize( |
| 83 | + $alternate-color: blue, |
| 84 | + $background-color: blue |
| 85 | + ); |
| 86 | + } |
75 | 87 | } |
76 | 88 |
|
77 | 89 | .ns-root #{if($compat, '&-brown', '&.-brown')} { |
78 | 90 | @include colorize( |
79 | | - $background-color: brown, |
80 | 91 | $border-color: brown, |
81 | | - $alternate-color: brown |
| 92 | + $color: brown |
82 | 93 | ); |
| 94 | + |
| 95 | + #{if($compat, '&.btn-primary', '&.-primary')} { |
| 96 | + @include colorize( |
| 97 | + $alternate-color: brown, |
| 98 | + $background-color: brown |
| 99 | + ); |
| 100 | + } |
83 | 101 | } |
84 | 102 |
|
85 | 103 | .ns-root #{if($compat, '&-forest', '&.-forest')} { |
86 | 104 | @include colorize( |
87 | | - $alternate-color: forest, |
88 | | - $background-color: forest, |
89 | | - $border-color: forest |
| 105 | + $border-color: forest, |
| 106 | + $color: forest |
90 | 107 | ); |
| 108 | + |
| 109 | + #{if($compat, '&.btn-primary', '&.-primary')} { |
| 110 | + @include colorize( |
| 111 | + $alternate-color: forest, |
| 112 | + $background-color: forest |
| 113 | + ); |
| 114 | + } |
91 | 115 | } |
92 | 116 |
|
93 | 117 | .ns-root #{if($compat, '&-grey', '&.-grey')} { |
94 | 118 | @include colorize( |
95 | | - $background-color: grey-dark, |
96 | 119 | $border-color: grey-dark, |
97 | | - $alternate-color: grey-dark |
| 120 | + $color: grey-dark |
98 | 121 | ); |
| 122 | + |
| 123 | + #{if($compat, '&.btn-primary', '&.-primary')} { |
| 124 | + @include colorize( |
| 125 | + $alternate-color: grey-dark, |
| 126 | + $background-color: grey-dark |
| 127 | + ); |
| 128 | + } |
99 | 129 | } |
100 | 130 |
|
101 | 131 | .ns-root #{if($compat, '&-lemon', '&.-lemon')} { |
102 | 132 | @include colorize( |
103 | | - $background-color: lemon, |
104 | 133 | $border-color: lemon, |
105 | | - $alternate-color: lemon |
| 134 | + $color: lemon |
106 | 135 | ); |
| 136 | + |
| 137 | + #{if($compat, '&.btn-primary', '&.-primary')} { |
| 138 | + @include colorize( |
| 139 | + $alternate-color: lemon, |
| 140 | + $background-color: lemon |
| 141 | + ); |
| 142 | + } |
107 | 143 | } |
108 | 144 |
|
109 | 145 | .ns-root #{if($compat, '&-lime', '&.-lime')} { |
110 | 146 | @include colorize( |
111 | | - $background-color: lime, |
112 | 147 | $border-color: lime, |
113 | | - $alternate-color: lime |
| 148 | + $color: lime |
114 | 149 | ); |
| 150 | + |
| 151 | + #{if($compat, '&.btn-primary', '&.-primary')} { |
| 152 | + @include colorize( |
| 153 | + $alternate-color: lime, |
| 154 | + $background-color: lime |
| 155 | + ); |
| 156 | + } |
115 | 157 | } |
116 | 158 |
|
117 | 159 | .ns-root #{if($compat, '&-orange', '&.-orange')} { |
118 | 160 | @include colorize( |
119 | | - $background-color: orange, |
120 | 161 | $border-color: orange, |
121 | | - $alternate-color: orange |
| 162 | + $color: orange |
122 | 163 | ); |
| 164 | + |
| 165 | + #{if($compat, '&.btn-primary', '&.-primary')} { |
| 166 | + @include colorize( |
| 167 | + $alternate-color: orange, |
| 168 | + $background-color: orange |
| 169 | + ); |
| 170 | + } |
123 | 171 | } |
124 | 172 |
|
125 | 173 | .ns-root #{if($compat, '&-purple', '&.-purple')} { |
126 | 174 | @include colorize( |
127 | | - $background-color: purple, |
128 | 175 | $border-color: purple, |
129 | | - $alternate-color: purple |
| 176 | + $color: purple |
130 | 177 | ); |
| 178 | + |
| 179 | + #{if($compat, '&.btn-primary', '&.-primary')} { |
| 180 | + @include colorize( |
| 181 | + $alternate-color: purple, |
| 182 | + $background-color: purple |
| 183 | + ); |
| 184 | + } |
131 | 185 | } |
132 | 186 |
|
133 | | - .ns-root #{if($compat, '&-ruby', '&.-ruby')} { |
| 187 | + .ns-root #{if($compat, '&-ruby.btn', '&.-ruby')} { |
134 | 188 | @include colorize( |
135 | | - $background-color: ruby, |
136 | 189 | $border-color: ruby, |
137 | | - $alternate-color: ruby |
| 190 | + $color: ruby |
138 | 191 | ); |
| 192 | + |
| 193 | + #{if($compat, '&.btn-primary', '&.-primary')} { |
| 194 | + @include colorize( |
| 195 | + $alternate-color: ruby, |
| 196 | + $background-color: ruby |
| 197 | + ); |
| 198 | + } |
139 | 199 | } |
140 | 200 |
|
141 | 201 | .ns-root #{if($compat, '&-sky', '&.-sky')} { |
142 | 202 | @include colorize( |
143 | | - $background-color: sky, |
144 | 203 | $border-color: sky, |
145 | | - $alternate-color: sky |
| 204 | + $color: sky |
146 | 205 | ); |
| 206 | + |
| 207 | + #{if($compat, '&.btn-primary', '&.-primary')} { |
| 208 | + @include colorize( |
| 209 | + $alternate-color: sky, |
| 210 | + $background-color: sky |
| 211 | + ); |
| 212 | + } |
147 | 213 | } |
148 | 214 | } |
149 | 215 | } |
150 | 216 |
|
151 | 217 | // Skin |
152 | 218 |
|
| 219 | +@keyframes empty {} |
| 220 | + |
153 | 221 | @mixin button-animations($animation: "", $color: background, $percent: 5%, $root: false) { |
154 | 222 | @at-root { |
155 | 223 | @keyframes #{$animation}-hightlight-light { |
|
226 | 294 | $contrasted-border-color: accent background 20% |
227 | 295 | ); |
228 | 296 |
|
229 | | - #{if($compat, '&.btn-active, &.btn:active', '&:active, &.-active')} { |
| 297 | + #{if($compat, '&.btn-active, &:active', '&:active, &.-active')} { |
230 | 298 | @include button-animations(); |
231 | 299 | } |
232 | 300 | } |
|
239 | 307 | $border-color: accent |
240 | 308 | ); |
241 | 309 |
|
242 | | - #{if($compat, '&.btn-active, &.btn:active', '&:active, &.-active')} { |
243 | | - @include button-animations(accent, accent, 10%); |
| 310 | + #{if($compat, '&.btn-active, &:active', '&:active, &.-active')} { |
| 311 | + @if $enable-rounded { |
| 312 | + @include button-animations(accent, accent, 10%); |
| 313 | + } @else { |
| 314 | + @include colorize($contrasted-background-color: accent background 10%); |
| 315 | + } |
244 | 316 | } |
245 | 317 | } |
246 | 318 | } |
|
0 commit comments