Skip to content

Commit 843077d

Browse files
imklaujedrzejchalubek
authored andcommitted
fix(menu-item): Introduce a new active color for nested menu items (#131)
1 parent f594c10 commit 843077d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/_includes/menu/menu-item.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
{% assign currentSectionPath = item.slug | downcase %}
3131
{% capture currentSectionSlug %}{{ currentSectionPage[0] | downcase }}/{{ currentSectionPage[1] | downcase }}{% endcapture %}
3232

33-
<li class="menu-item {% if currentPage == currentPath or currentSectionSlug == currentSectionPath %}menu-item--active{% endif %}" data-accordion data-class-active="menu-item--active">
33+
<li class="menu-item menu-item--gray {% if currentPage == currentPath or currentSectionSlug == currentSectionPath %}menu-item--active{% endif %}" data-accordion data-class-active="menu-item--active">
3434
{% if item.path %}
3535
<a class="menu-item__link {% if currentPage == currentPath or currentSectionSlug == currentSectionPath %}menu-item__link--indicator-large{% endif %} flex" href="{{ site.baseurl }}{{ item.path }}">{{ item.title }}</a>
3636
{% endif %}

src/_sass/components/_menu-item.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@
125125
transform: rotate(180deg);
126126
}
127127
}
128+
129+
&#{$this}--gray {
130+
& > #{$this}__link {
131+
color: rgba(color(gray-dark), 0.8);
132+
font-weight: 500;
133+
}
134+
}
128135
}
129136

130137
&--separated {

0 commit comments

Comments
 (0)