|
273 | 273 | $border_strength: if(lightness($bg) > 50, 0, .1); |
274 | 274 | $shadow_strength: if(lightness($bg) > 50, 0, .1); |
275 | 275 |
|
276 | | - $button_bg: if(lightness($bg) > 50, shade($bg, 1.08), shade($bg, 1.2)); |
| 276 | + $button_bg: if(lightness($bg) > 50, $bg, shade($bg, 1.2)); |
277 | 277 |
|
278 | 278 | @extend %button; |
279 | 279 | @if (lightness($button_bg) > 50) { |
280 | 280 | border-color: border_normal($button_bg); |
281 | | - @include linear-gradient($button_bg, 1.08); |
| 281 | + @include linear-gradient(shade($button_bg, 1.08)); |
282 | 282 | } @else { |
283 | 283 | @include linear-gradient($button_bg); |
284 | 284 | @include border(rgba(0, 0, 0, .12 + $border_strength)); |
|
298 | 298 | &:focus, &:hover { |
299 | 299 | @if (lightness($button_bg) > 50) { |
300 | 300 | border-color: border_active($button_bg); |
301 | | - @include linear-gradient(shade($button_bg, 1.10)); |
| 301 | + @include linear-gradient(shade($button_bg, 1.11)); |
302 | 302 | } @else { |
303 | 303 | @include linear-gradient(shade($button_bg, 1.2)); |
304 | 304 | @include border(rgba(0, 0, 0, .2 + $border_strength)); |
|
417 | 417 | } |
418 | 418 |
|
419 | 419 | &:not(.vertical) { |
420 | | - @extend %entry; |
421 | | - @include linear-gradient($base_color, to top); |
422 | | - border-color: border_normal($base_color); |
| 420 | + @if (lightness($bg_color) > 50) { |
| 421 | + border: 1px solid border_normal($bg_color); |
| 422 | + background-color: transparent; |
| 423 | + background-image: none; |
| 424 | + box-shadow: inset 1px 0 shade($base_color, .9); |
| 425 | + } @else { |
| 426 | + @extend %entry; |
| 427 | + @include linear-gradient($base_color, to top); |
| 428 | + @include border($base_color); |
| 429 | + } |
423 | 430 |
|
424 | 431 | padding: 0; |
425 | 432 |
|
|
444 | 451 | border-radius: 0; |
445 | 452 | border-color: alpha($borders_color, .8); |
446 | 453 | border-style: none none none solid; |
447 | | - background-color: shade($bg_color, 1.08); |
448 | 454 | background-image: none; |
449 | 455 | box-shadow: none; |
450 | 456 |
|
451 | | - &:hover { background-color: shade($bg_color, 1.2); } |
| 457 | + @if (lightness($bg_color) > 50) { |
| 458 | + background-color: shade($bg_color, 1.08); |
| 459 | + } |
| 460 | + |
| 461 | + &:hover { |
| 462 | + @if (lightness($bg_color) > 50) { |
| 463 | + background-color: shade($bg_color, 1.11); |
| 464 | + } |
| 465 | + } |
452 | 466 |
|
453 | 467 | &:dir(rtl) { border-style: none solid none none; } |
454 | 468 |
|
|
0 commit comments