_menu.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. @import "variables";
  2. #menucont {
  3. #menu-checkbox {
  4. display: none;
  5. }
  6. .menutitle {
  7. display: none;
  8. }
  9. .menu {
  10. margin: 0;
  11. padding: 0;
  12. li {
  13. width: 100%;
  14. list-style-type: none;
  15. padding: 0;
  16. a {
  17. color: #FFF;
  18. width: 100%;
  19. margin: 0;
  20. font-weight: 300;
  21. text-transform: uppercase;
  22. line-height: 22px;
  23. text-decoration: none;
  24. letter-spacing: 2px;
  25. }
  26. &:hover {
  27. background: rgba(0, 0, 0, 0.2);
  28. }
  29. &.active {
  30. background: rgba(0, 0, 0, 0.2);
  31. a {
  32. font-weight: 600;
  33. }
  34. }
  35. .menu-item-text {
  36. padding: $default-gutter/2 $default-gutter;
  37. width: 100%;
  38. }
  39. }
  40. }
  41. }
  42. // From the awesome animate.css
  43. @keyframes fadeIn {
  44. from {
  45. opacity: 0;
  46. }
  47. to {
  48. opacity: 1;
  49. }
  50. }
  51. @media screen and (max-width: $mobile-breakpoint) {
  52. #menucont {
  53. #menu-checkbox {
  54. &:checked ~ .menu {
  55. display: block;
  56. margin-bottom: .5em;
  57. }
  58. }
  59. .menutitle {
  60. display: flex;
  61. align-items: center;
  62. padding: $default-gutter/2 $default-gutter;
  63. cursor: pointer;
  64. text-transform: uppercase;
  65. opacity: $default-opacity;
  66. .icon-menu {
  67. // color: currentColor;
  68. fill: currentColor;
  69. // margin: 0 0 0 2px;
  70. // font-size: $default-font-size * 1.2;
  71. height: $default-font-size;
  72. width: $default-font-size;
  73. }
  74. .menu-text {
  75. margin: 0 0 0 .8em;
  76. font-size: $default-font-size;
  77. font-weight: $font-weight-heavy;
  78. letter-spacing: 2px;
  79. line-height: 1;
  80. }
  81. }
  82. .menu {
  83. animation-name: fadeIn;
  84. animation-duration: 1s;
  85. animation-fill-mode: both;
  86. display: none;
  87. li {
  88. &.active {
  89. background: transparent;
  90. a, a:hover {
  91. font-weight: 600;
  92. color: #FFF;
  93. }
  94. }
  95. a {
  96. width: 100%;
  97. display: inline-block;
  98. margin: 0;
  99. line-height: 23px;
  100. color: rgba(255, 255, 255, 0.6);
  101. font-weight: 300;
  102. text-transform: uppercase;
  103. }
  104. .menu-item-text {
  105. padding: $default-gutter/4 $default-gutter;
  106. }
  107. }
  108. }
  109. }
  110. }