_site-navigation.scss 2.3 KB

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