Lightweight CSS Framework for Building Apps and Websites https://crispy-css.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.5 KiB

4 years ago
  1. /**
  2. *
  3. *
  4. *
  5. *
  6. */
  7. @mixin components__button() {
  8. .button {
  9. position: relative;
  10. color: $crispy__color-white;
  11. border: 0;
  12. padding: 10px 30px;
  13. transition: background-color 0.3s ease-in-out;
  14. background: url(
  15. data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAFklEQVQYlWNgIBJIIWFsfCooGEg3AACalwOpdVZM4wAAAABJRU5ErkJggg==
  16. ) repeat;
  17. &--highlight {
  18. border: 4px solid $crispy__color-background;
  19. &:after, &:before {
  20. position: absolute;
  21. z-index: -1;
  22. top: -6px;
  23. width: 15px;
  24. height: 56px;
  25. content: '';
  26. }
  27. &:before {
  28. left: -6px;
  29. }
  30. &:after {
  31. right: -6px;
  32. }
  33. }
  34. }
  35. @each $name, $color in $crispy__colors {
  36. .button--#{$name} {
  37. text-shadow: 0 0 3px #000000;
  38. background-color: darken($color, 8%) !important;
  39. &:hover {
  40. background-color: lighten($color, 5%) !important;
  41. }
  42. &.button--highlight {
  43. &:after, &:before {
  44. background-color: darken($color, 8%) !important;
  45. }
  46. &:hover {
  47. &:after, &:before {
  48. background-color: lighten($color, 5%) !important;
  49. }
  50. }
  51. }
  52. }
  53. }
  54. }