_button.scss 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. ///
  2. /// Dimension 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', 'background-color #{_duration(transition)} ease-in-out, color #{_duration(transition)} ease-in-out');
  14. background-color: transparent;
  15. border-radius: _size(border-radius);
  16. border: 0;
  17. box-shadow: inset 0 0 0 _size(border-width) _palette(border);
  18. color: _palette(fg-bold) !important;
  19. cursor: pointer;
  20. display: inline-block;
  21. font-size: 0.8rem;
  22. font-weight: _font(weight);
  23. height: _size(element-height);
  24. letter-spacing: _font(letter-spacing);
  25. line-height: _size(element-height);
  26. outline: 0;
  27. padding: 0 1.25rem 0 (1.25rem + (_font(letter-spacing) * 0.5));
  28. text-align: center;
  29. text-decoration: none;
  30. text-transform: uppercase;
  31. white-space: nowrap;
  32. &:hover {
  33. background-color: _palette(border-bg);
  34. }
  35. &:active {
  36. background-color: _palette(border-bg-alt);
  37. }
  38. &.icon {
  39. &:before {
  40. margin-right: 0.5em;
  41. }
  42. }
  43. &.fit {
  44. width: 100%;
  45. }
  46. &.small {
  47. font-size: 0.6rem;
  48. height: (_size(element-height) * 0.75);
  49. line-height: (_size(element-height) * 0.75);
  50. }
  51. &.primary {
  52. background-color: _palette(fg-bold);
  53. color: _palette(bg) !important;
  54. font-weight: _font(weight-bold);
  55. &:hover {
  56. }
  57. &:active {
  58. }
  59. }
  60. &.disabled,
  61. &:disabled {
  62. @include vendor('pointer-events', 'none');
  63. cursor: default;
  64. opacity: 0.25;
  65. }
  66. }
  67. input[type="submit"],
  68. input[type="reset"],
  69. input[type="button"],
  70. button {
  71. line-height: calc(#{_size(element-height)} - 2px);
  72. }