_mobile.sass 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. @media screen and (max-width: 769px)
  2. .nav
  3. // padding-bottom: 2rem
  4. &, &_body
  5. flex-direction: column
  6. &_body
  7. position: fixed
  8. width: 90%
  9. max-width: 16.5rem
  10. top: 0
  11. bottom: 0
  12. background-color: $bg
  13. transition: transform 0.3s var(--easing)
  14. &_right
  15. transform: translateX(100vw)
  16. right: 0
  17. &_left
  18. transform: translateX(-100vw)
  19. left: 0
  20. &_close
  21. width: 3rem
  22. position: absolute
  23. right: -4rem
  24. top: 0
  25. bottom: 0
  26. height: 100%
  27. cursor: pointer
  28. z-index: 1000
  29. display: flex
  30. justify-content: center
  31. align-items: center
  32. svg
  33. width: 1.25rem
  34. fill: var(--light)
  35. height: 1.25rem
  36. display: none
  37. &:first-child
  38. display: initial
  39. &.isopen
  40. display: none
  41. + svg
  42. display: initial
  43. &_brand
  44. position: relative
  45. z-index: 999
  46. width: calc(100% - 3rem)
  47. padding-left: 0
  48. &_parent
  49. display: grid
  50. &_sub
  51. position: relative
  52. top: initial
  53. padding-top: 0
  54. .jsopen
  55. &::after
  56. content: ""
  57. position: fixed
  58. z-index: 2
  59. background-color: rgba(0,0,0,0.3)
  60. top: 0
  61. left: 0
  62. right: 0
  63. bottom: 0
  64. .nav
  65. &_body
  66. transform: translateX(0)
  67. padding-left: 1.5rem
  68. padding-right: 1.5rem
  69. &_parent
  70. &:first-child
  71. margin-top: 4.4rem
  72. .follow
  73. justify-content: flex-start
  74. flex: initial
  75. margin-top: 0.75rem