_extends.scss 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. @mixin button-style {
  2. @include crop-text(var(--button--line-height));
  3. color: var(--button--color-text);
  4. cursor: pointer;
  5. font-weight: var(--button--font-weight);
  6. font-family: var(--button--font-family);
  7. font-size: var(--button--font-size);
  8. background-color: var(--button--color-background);
  9. border-radius: var(--button--border-radius);
  10. border-width: 0;
  11. text-decoration: none;
  12. padding: var(--button--padding-vertical) var(--button--padding-horizontal);
  13. &:active {
  14. color: var(--button--color-text-active);
  15. background-color: var(--button--color-background-active);
  16. }
  17. &:hover,
  18. &:focus,
  19. &.has-focus {
  20. color: var(--button--color-text-hover);
  21. background-color: var(--button--color-background-hover);
  22. }
  23. }
  24. // Button Placeholder style
  25. // - Since buttons appear in various blocks,
  26. // let’s use a placeholder to keep them all
  27. // in-sync
  28. %button-style {
  29. @include button-style;
  30. }
  31. // Onsale Placeholder style
  32. // - Since buttons appear in various blocks,
  33. // let’s use a placeholder to keep them all
  34. // in-sync
  35. %onsale-style {
  36. border-radius: 100%;
  37. background-color: var(--global--color-alert-warning);
  38. color: var(--global--color-foreground-high-contrast);
  39. font-size: var(--global--font-size-sm);
  40. font-weight: 700;
  41. font-family: var(--global--font-primary);
  42. min-height: 3.236rem;
  43. min-width: 3.236rem;
  44. padding: 0.202rem;
  45. position: absolute;
  46. text-align: center;
  47. text-transform: none;
  48. line-height: 3.236;
  49. top: -0.5em;
  50. right: -0.5em;
  51. left: auto;
  52. margin: 0;
  53. z-index: 9;
  54. }