hamburger.scss 901 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. @use '../mixins' as *;
  2. .menu-hamburger {
  3. width: 20px;
  4. display: flex;
  5. flex-direction: column;
  6. cursor: pointer;
  7. justify-content: center;
  8. height: var(--nav-height);
  9. margin: 0 14px;
  10. > span {
  11. background-color: var(--text-color);
  12. border-radius: 10px;
  13. height: 2px;
  14. margin: 2px 0;
  15. transition: var(--el-transition-all);
  16. width: 100%;
  17. &.hamburger {
  18. &-1 {
  19. width: 50%;
  20. }
  21. &-3 {
  22. width: 75%;
  23. }
  24. }
  25. }
  26. &.active {
  27. .hamburger {
  28. &-1 {
  29. transform-origin: bottom;
  30. transform: rotatez(45deg) translate(13px, 0px);
  31. }
  32. &-2 {
  33. transform-origin: top;
  34. transform: rotatez(-45deg);
  35. }
  36. &-3 {
  37. transform-origin: bottom;
  38. width: 50%;
  39. transform: translate(2px, -10px) rotatez(45deg);
  40. }
  41. }
  42. }
  43. @include respond-to('md') {
  44. display: none;
  45. }
  46. }