Blog-style website for karathan using the self-made Stellar Theme powered by HTML5Up http://blog.karathan.at

_button.scss 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. ///
  2. /// Stellar 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. 'color #{_duration(transition)} ease-in-out'
  16. ));
  17. border-radius: _size(border-radius);
  18. border: 0;
  19. cursor: pointer;
  20. display: inline-block;
  21. font-weight: _font(weight);
  22. height: 2.75em;
  23. line-height: 2.75em;
  24. min-width: 9.25em;
  25. padding: 0 1.5em;
  26. text-align: center;
  27. text-decoration: none;
  28. white-space: nowrap;
  29. &.icon {
  30. padding-left: 1.35em;
  31. &:before {
  32. margin-right: 0.5em;
  33. }
  34. }
  35. &.fit {
  36. width: 100%;
  37. }
  38. &.small {
  39. font-size: 0.8em;
  40. }
  41. &.large {
  42. font-size: 1.35em;
  43. }
  44. &.disabled,
  45. &:disabled {
  46. @include vendor('pointer-events', 'none');
  47. opacity: 0.25;
  48. }
  49. @include breakpoint('<=small') {
  50. min-width: 0;
  51. }
  52. }
  53. @mixin color-button($p: null) {
  54. input[type="submit"],
  55. input[type="reset"],
  56. input[type="button"],
  57. button,
  58. .button {
  59. background-color: transparent;
  60. box-shadow: inset 0 0 0 1px _palette($p, border);
  61. color: _palette($p, fg-bold) !important;
  62. &:hover {
  63. background-color: _palette($p, border-bg);
  64. }
  65. &:active {
  66. background-color: _palette($p, border2-bg);
  67. }
  68. &.icon {
  69. &:before {
  70. color: _palette($p, fg-light);
  71. }
  72. }
  73. &.primary {
  74. background-color: _palette(accent);
  75. color: _palette(invert, bg) !important;
  76. box-shadow: none;
  77. &:hover {
  78. background-color: lighten(_palette(accent), 3);
  79. }
  80. &:active {
  81. background-color: darken(_palette(accent), 3);
  82. }
  83. &.icon {
  84. &:before {
  85. color: _palette(invert, bg) !important;
  86. }
  87. }
  88. }
  89. }
  90. }
  91. @include color-button;