_site-navigation.scss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. $color_primary_default: #{map-deep-get($config-global, "color", "primary", "default")};
  2. $color_primary_hover: #{map-deep-get($config-global, "color", "primary", "hover")};
  3. /**
  4. * Main Menu
  5. */
  6. #site-navigation {
  7. background-color: $color_primary_default;
  8. order: 2;
  9. text-align: center;
  10. width: 100%;
  11. &.main-navigation {
  12. ul > li:hover > a,
  13. ul > li.focus > a,
  14. ul > li.current-menu-item > a {
  15. background-color: $color_primary_hover;
  16. }
  17. ul {
  18. text-align: inherit;
  19. li {
  20. text-align: left;
  21. &:first-of-type {
  22. > a {
  23. padding-left: map-deep-get($config-global, "spacing", "unit");
  24. }
  25. }
  26. &:last-of-type {
  27. > a {
  28. padding-right: map-deep-get($config-global, "spacing", "unit");
  29. }
  30. }
  31. a {
  32. padding: map-deep-get($config-global, "spacing", "unit");
  33. text-decoration: none;
  34. &:before,
  35. &:after {
  36. margin: 0;
  37. }
  38. }
  39. }
  40. @include media(mobile) {
  41. li {
  42. padding: 0;
  43. }
  44. &.main-menu > li:after {
  45. color: $color_primary_hover;
  46. content: "\2022";
  47. display: inline;
  48. font-size: map-deep-get($config-global, "font", "size", "sm");
  49. line-height: 1;
  50. padding: #{map-deep-get($config-global, "spacing", "unit")} #{0.5 * map-deep-get($config-global, "spacing", "unit")};
  51. }
  52. &.main-menu > li:last-child:after {
  53. display: none;
  54. }
  55. }
  56. ul {
  57. background-color: $color_primary_default;
  58. box-shadow: none;
  59. }
  60. }
  61. .main-menu {
  62. margin-left: 0;
  63. margin-right: 0;
  64. }
  65. }
  66. }
  67. /**
  68. * Mobile Menu
  69. */
  70. .main-navigation #toggle:focus + #toggle-menu,
  71. #toggle-menu {
  72. background: map-deep-get($config-global, "color", "primary", "default");
  73. color: map-deep-get($config-global, "color", "background", "default");
  74. border-radius: 0;
  75. text-align: center;
  76. text-decoration: none;
  77. width: 100%;
  78. &:active,
  79. &:focus,
  80. &:hover {
  81. background: map-deep-get($config-global, "color", "primary", "hover");
  82. color: map-deep-get($config-global, "color", "background", "default");
  83. }
  84. }
  85. .main-navigation #toggle:checked ~ div {
  86. border-top: 2px solid map-deep-get($config-global, "color", "background", "default");
  87. @include media(mobile) {
  88. border-top: 0;
  89. }
  90. }