_button.scss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. ///
  2. /// Hyperspace 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. 'border-color #{_duration(transition)} ease'
  15. ));
  16. background-color: transparent;
  17. border: solid 1px !important;
  18. border-color: _palette(border) !important;
  19. border-radius: 3em;
  20. color: _palette(fg-bold) !important;
  21. cursor: pointer;
  22. display: inline-block;
  23. font-size: 0.6em;
  24. font-weight: _font(weight-bold);
  25. height: calc(4.75em + 2px);
  26. letter-spacing: _font(kerning-alt);
  27. line-height: 4.75em;
  28. outline: 0;
  29. padding: 0 3.75em;
  30. position: relative;
  31. text-align: center;
  32. text-decoration: none;
  33. text-transform: uppercase;
  34. white-space: nowrap;
  35. &:after {
  36. @include vendor('transform', 'scale(0.25)');
  37. @include vendor('pointer-events', 'none');
  38. @include vendor('transition', (
  39. 'opacity #{_duration(transition)} ease',
  40. 'transform #{_duration(transition)} ease'
  41. ));
  42. background: _palette(fg-bold);
  43. border-radius: 3em;
  44. content: '';
  45. height: 100%;
  46. left: 0;
  47. opacity: 0;
  48. position: absolute;
  49. top: 0;
  50. width: 100%;
  51. }
  52. &.icon {
  53. &:before {
  54. margin-right: 0.75em;
  55. }
  56. }
  57. &.fit {
  58. display: block;
  59. margin: 0 0 (_size(element-margin) * 0.5) 0;
  60. width: 100%;
  61. }
  62. &.small {
  63. font-size: 0.4em;
  64. }
  65. &.big {
  66. font-size: 0.8em;
  67. }
  68. &.special {
  69. background-color: _palette(fg-bold);
  70. color: _palette(bg) !important;
  71. &:after {
  72. display: none;
  73. }
  74. }
  75. &.disabled,
  76. &:disabled {
  77. cursor: default;
  78. opacity: 0.5;
  79. @include vendor('pointer-events', 'none');
  80. }
  81. &:hover {
  82. border-color: _palette(fg) !important;
  83. &:after {
  84. opacity: 0.05;
  85. @include vendor('transform', 'scale(1)');
  86. }
  87. &:active {
  88. border-color: _palette(fg-bold) !important;
  89. &:after {
  90. opacity: 0.1;
  91. }
  92. }
  93. }
  94. }