_base.scss 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Hamburger
  2. // ==================================================
  3. .hamburger {
  4. padding: $hamburger-padding-y $hamburger-padding-x;
  5. display: inline-block;
  6. cursor: pointer;
  7. transition-property: opacity, filter;
  8. transition-duration: $hamburger-hover-transition-duration;
  9. transition-timing-function: $hamburger-hover-transition-timing-function;
  10. // Normalize (<button>)
  11. font: inherit;
  12. color: inherit;
  13. text-transform: none;
  14. background-color: transparent;
  15. border: 0;
  16. margin: 0;
  17. overflow: visible;
  18. &:hover {
  19. @if $hamburger-hover-use-filter == true {
  20. filter: $hamburger-hover-filter;
  21. } @else {
  22. opacity: $hamburger-hover-opacity;
  23. }
  24. }
  25. }
  26. .hamburger-box {
  27. width: $hamburger-layer-width;
  28. height: $hamburger-layer-height * 3 + $hamburger-layer-spacing * 2;
  29. display: inline-block;
  30. position: relative;
  31. vertical-align: middle;
  32. }
  33. .hamburger-inner {
  34. display: block;
  35. top: 50%;
  36. margin-top: $hamburger-layer-height / -2;
  37. &,
  38. &::before,
  39. &::after {
  40. width: $hamburger-layer-width;
  41. height: $hamburger-layer-height;
  42. background-color: $hamburger-layer-color;
  43. border-radius: $hamburger-layer-border-radius;
  44. position: absolute;
  45. transition-property: transform;
  46. transition-duration: 0.15s;
  47. transition-timing-function: ease;
  48. }
  49. &::before,
  50. &::after {
  51. content: '';
  52. display: block;
  53. }
  54. &::before {
  55. top: ($hamburger-layer-spacing + $hamburger-layer-height) * -1;
  56. }
  57. &::after {
  58. bottom: ($hamburger-layer-spacing + $hamburger-layer-height) * -1;
  59. }
  60. }