_button.scss 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. ///
  2. /// Paradigm Shift by HTML5 UP
  3. /// html5up.net | @ajlkn
  4. /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
  5. ///
  6. /* Button */
  7. input[type="submit"],
  8. input[type="reset"],
  9. input[type="button"],
  10. button,
  11. .button {
  12. @include vendor('appearance', 'none');
  13. @include vendor('transition', (
  14. 'background-color #{_duration(transition)} ease-in-out',
  15. 'box-shadow #{_duration(transition)} ease-in-out',
  16. 'color #{_duration(transition)} ease-in-out'
  17. ));
  18. background-color: transparent;
  19. border-radius: _size(border-radius);
  20. border: 0;
  21. box-shadow: inset 0 0 0 2px _palette(border);
  22. color: _palette(fg-bold) !important;
  23. cursor: pointer;
  24. display: inline-block;
  25. font-family: _font(family-heading);
  26. font-size: 0.6rem;
  27. font-weight: _font(weight-heading-light);
  28. height: (_size(element-height) * 1);
  29. letter-spacing: _font(kerning-heading);
  30. line-height: (_size(element-height) * 1);
  31. padding: 0 2rem;
  32. text-align: center;
  33. text-decoration: none;
  34. text-transform: uppercase;
  35. white-space: nowrap;
  36. &:hover {
  37. box-shadow: inset 0 0 0 2px _palette(accent-alt);
  38. color: _palette(accent-alt) !important;
  39. }
  40. &:active {
  41. background-color: _palette(accent-bg);
  42. box-shadow: inset 0 0 0 2px _palette(accent-alt);
  43. color: _palette(accent-alt) !important;
  44. }
  45. &.small {
  46. font-size: 0.5rem;
  47. height: _size(element-height) * 0.75;
  48. line-height: _size(element-height) * 0.75;
  49. padding: 0 1.25rem;
  50. }
  51. &.large {
  52. font-size: 0.7rem;
  53. height: _size(element-height) * 1.0875;
  54. line-height: _size(element-height) * 1.0875;
  55. padding: 0 3.25rem;
  56. }
  57. &.wide {
  58. min-width: 13rem;
  59. }
  60. &.icon {
  61. &:before {
  62. margin-right: 0.5rem;
  63. }
  64. }
  65. &.fit {
  66. width: 100%;
  67. }
  68. &.disabled,
  69. &:disabled {
  70. @include vendor('pointer-events', 'none');
  71. opacity: 0.25;
  72. }
  73. &.primary {
  74. background-color: _palette(accent);
  75. box-shadow: none;
  76. color: _palette(fg-bold) !important;
  77. &:hover {
  78. background-color: saturate(lighten(_palette(accent), 15), 10);
  79. }
  80. &:active {
  81. background-color: desaturate(darken(_palette(accent), 3), 10);
  82. }
  83. }
  84. @include breakpoint('<=small') {
  85. font-size: 0.7rem;
  86. height: (_size(element-height) * 1.1);
  87. line-height: (_size(element-height) * 1.1);
  88. &.large {
  89. font-size: 0.8rem;
  90. height: _size(element-height) * 1.25;
  91. line-height: _size(element-height) * 1.25;
  92. }
  93. &.small {
  94. font-size: 0.6rem;
  95. height: (_size(element-height) * 1);
  96. line-height: (_size(element-height) * 1);
  97. }
  98. }
  99. }