hamburger.css 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. /* Basic styles */
  2. #mobile-header {
  3. font-family: sans-serif;
  4. right: 0;
  5. }
  6. #mobile-header {
  7. position: absolute;
  8. font-family: sans-serif;
  9. }
  10. /* Toggle functionality */
  11. #toggle {
  12. position: absolute;
  13. left: -100%;
  14. top: -100%;
  15. }
  16. #toggle:focus ~ .toggle-container .button-toggle {
  17. box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.1), inset 0 0 0 8px rgba(0, 0, 0, 0.1);
  18. }
  19. #toggle:checked ~ .toggle-container .button-toggle {
  20. box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.1), inset 0 0 0 8px rgba(0, 0, 0, 0.1);
  21. }
  22. #toggle:checked ~ .toggle-container .button-toggle:hover {
  23. box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.1), inset 0 0 0 8px rgba(0, 0, 0, 0.1), 0 0 0 8px rgba(0, 0, 0, 0.1), inset 0 0 0 8px rgba(0, 0, 0, 0.1);
  24. }
  25. #toggle:checked ~ .toggle-container .button-toggle:before {
  26. -webkit-transform: translateY(-50%) rotate(45deg) scale(1);
  27. -ms-transform: translateY(-50%) rotate(45deg) scale(1);
  28. transform: translateY(-50%) rotate(45deg) scale(1);
  29. }
  30. #toggle:checked ~ .toggle-container .button-toggle:after {
  31. -webkit-transform: translateY(-50%) rotate(-45deg) scale(1);
  32. -ms-transform: translateY(-50%) rotate(-45deg) scale(1);
  33. transform: translateY(-50%) rotate(-45deg) scale(1);
  34. }
  35. #toggle:checked:focus ~ .toggle-container .button-toggle {
  36. box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.1), inset 0 0 0 8px rgba(0, 0, 0, 0.1), 0 0 0 8px rgba(0, 0, 0, 0.1), inset 0 0 0 8px rgba(0, 0, 0, 0.1);
  37. }
  38. #toggle:checked ~ .nav {
  39. margin-bottom: 100px;
  40. pointer-events: auto;
  41. -webkit-transform: translate(0px, 50px);
  42. -ms-transform: translate(0px, 50px);
  43. transform: translate(0px, 50px);
  44. }
  45. /*
  46. #toggle:check ~ .nav .nav-item {
  47. } */
  48. #toggle:checked ~ .nav .nav-item {
  49. /* margin-right: calc(var(--body-margin) + var(--tile-margin)); */
  50. font-family: 'akrobat-regular';
  51. color: black;
  52. letter-spacing: 0;
  53. height: 40px;
  54. line-height: 40px;
  55. float: none;
  56. text-align: right;
  57. /* margin-top: 0; */
  58. margin: 0;
  59. opacity: 1;
  60. -webkit-transform: scaleY(1);
  61. -ms-transform: scaleY(1);
  62. transform: scaleY(1);
  63. -webkit-transition: 0.5s, opacity 0.1s;
  64. transition: 0.5s, opacity 0.1s;
  65. }
  66. #toggle:checked ~ .nav .nav-item:nth-child(1) {
  67. -webkit-transition-delay: 0.15s;
  68. transition-delay: 0.15s;
  69. }
  70. #toggle:checked ~ .nav .nav-item:nth-child(1):before {
  71. -webkit-transition-delay: 0.15s;
  72. transition-delay: 0.15s;
  73. }
  74. #toggle:checked ~ .nav .nav-item:nth-child(2) {
  75. -webkit-transition-delay: 0.1s;
  76. transition-delay: 0.1s;
  77. }
  78. #toggle:checked ~ .nav .nav-item:nth-child(2):before {
  79. -webkit-transition-delay: 0.1s;
  80. transition-delay: 0.1s;
  81. }
  82. #toggle:checked ~ .nav .nav-item:nth-child(3) {
  83. -webkit-transition-delay: 0.05s;
  84. transition-delay: 0.05s;
  85. }
  86. #toggle:checked ~ .nav .nav-item:nth-child(3):before {
  87. -webkit-transition-delay: 0.05s;
  88. transition-delay: 0.05s;
  89. }
  90. #toggle:checked ~ .nav .nav-item:nth-child(4) {
  91. -webkit-transition-delay: 0s;
  92. transition-delay: 0s;
  93. }
  94. #toggle:checked ~ .nav .nav-item:nth-child(4):before {
  95. -webkit-transition-delay: 0s;
  96. transition-delay: 0s;
  97. }
  98. #toggle:checked ~ .nav .nav-item:before {
  99. opacity: 0;
  100. }
  101. /* Toggle button */
  102. .button-toggle {
  103. position: absolute;
  104. display: inline-block;
  105. right: 0;
  106. width: 20px;
  107. height: 20px;
  108. margin: 25px 0;
  109. box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.1), inset 0 0 0 8px rgba(0, 0, 0, 0.1);
  110. border: none;
  111. cursor: pointer;
  112. border-radius: 100%;
  113. -webkit-transition: 0.6s;
  114. transition: 0.6s;
  115. }
  116. /* button X container (toggled) */
  117. .button-toggle:before, .button-toggle:after {
  118. position: absolute;
  119. content: '';
  120. top: 50%;
  121. /* left: 0; */
  122. right: 0;
  123. width: 100%;
  124. height: 2px;
  125. background-color: black;
  126. border-radius: 5px;
  127. -webkit-transition: 0.5s;
  128. transition: 0.5s;
  129. }
  130. /* button \ container */
  131. .button-toggle:before {
  132. -webkit-transform: translateY(-50%) rotate(45deg) scale(0);
  133. -ms-transform: translateY(-50%) rotate(45deg) scale(0);
  134. transform: translateY(-50%) rotate(45deg) scale(0);
  135. }
  136. /* button / container */
  137. .button-toggle:after {
  138. -webkit-transform: translateY(-50%) rotate(-45deg) scale(0);
  139. -ms-transform: translateY(-50%) rotate(-45deg) scale(0);
  140. transform: translateY(-50%) rotate(-45deg) scale(0);
  141. }
  142. /* Menu */
  143. .nav {
  144. display: block;
  145. margin: 25px 0;
  146. pointer-events: none;
  147. -webkit-transition: 0.5s;
  148. transition: 0.5s;
  149. }
  150. .nav-item {
  151. position: relative;
  152. display: block;
  153. /* float: right; */
  154. /* text-align: right; */
  155. clear: both;
  156. color: transparent;
  157. font-size: 14px;
  158. letter-spacing: -6.2px;
  159. height: 7px;
  160. line-height: 7px;
  161. text-transform: uppercase;
  162. white-space: nowrap;
  163. -webkit-transform: scaleY(0.2);
  164. -ms-transform: scaleY(0.2);
  165. transform: scaleY(0.2);
  166. -webkit-transition: 0.5s, opacity 1s;
  167. transition: 0.5s, opacity 1s;
  168. }
  169. .nav-item:nth-child(1) {
  170. -webkit-transition-delay: 0s;
  171. transition-delay: 0s;
  172. }
  173. .nav-item:nth-child(1):before {
  174. -webkit-transition-delay: 0s;
  175. transition-delay: 0s;
  176. }
  177. .nav-item:nth-child(2) {
  178. -webkit-transition-delay: 0.05s;
  179. transition-delay: 0.05s;
  180. }
  181. .nav-item:nth-child(2):before {
  182. -webkit-transition-delay: 0.05s;
  183. transition-delay: 0.05s;
  184. }
  185. .nav-item:nth-child(3) {
  186. -webkit-transition-delay: 0.1s;
  187. transition-delay: 0.1s;
  188. }
  189. .nav-item:nth-child(3):before {
  190. -webkit-transition-delay: 0.1s;
  191. transition-delay: 0.1s;
  192. }
  193. .nav-item:nth-child(4) {
  194. -webkit-transition-delay: 0.15s;
  195. transition-delay: 0.15s;
  196. }
  197. .nav-item:nth-child(4):before {
  198. -webkit-transition-delay: 0.15s;
  199. transition-delay: 0.15s;
  200. }
  201. .nav-item:nth-child(1) {
  202. letter-spacing: -8px;
  203. }
  204. .nav-item:nth-child(2) {
  205. letter-spacing: -7px;
  206. }
  207. .nav-item:nth-child(n + 4) {
  208. letter-spacing: -8px;
  209. margin-top: -7px;
  210. opacity: 0;
  211. }
  212. .nav-item:before {
  213. position: absolute;
  214. content: '';
  215. top: 50%;
  216. /* left: 0; */
  217. width: 100%;
  218. height: 2px;
  219. background-color: black;
  220. -webkit-transform: translateY(-50%) scaleY(5);
  221. -ms-transform: translateY(-50%) scaleY(5);
  222. transform: translateY(-50%) scaleY(5);
  223. -webkit-transition: 0.5s;
  224. transition: 0.5s;
  225. }
  226. /* .main-layout {
  227. -webkit-transition: 0.5s;
  228. transition: 0.5s;
  229. }
  230. .main-layout:before {
  231. position: absolute;
  232. content: '';
  233. top: 0;
  234. left: 0;
  235. width: 100%;
  236. height: 100%;
  237. background-color: transparent;
  238. z-index: 2;
  239. -webkit-transition: 0.5s;
  240. transition: 0.5s;
  241. }
  242. #toggle:checked ~ .main-layout {
  243. padding-top: 30px;
  244. }
  245. #toggle:checked ~ .main-layout:before {
  246. background-color: rgba(0, 0, 0, 0.3);
  247. } */