Skip to content

feat(): Adjust menu active state indicators #664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/_includes/menu/menu-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
{% assign currentSectionPage = page.path | downcase | split: "/" %}
{% assign currentSectionPath = item.slug | downcase %}
{% capture currentSectionSlug %}{{ currentSectionPage[0] | downcase }}/{{ currentSectionPage[1] | downcase }}{% endcapture %}

<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">
<li class="menu-item {% if item.section_title %}menu-item--gray{% else %}menu-item--green{% endif %} {% if currentPage == currentPath or currentSectionSlug == currentSectionPath %}menu-item--active{% endif %}" data-accordion data-class-active="menu-item--active">
{% if item.path %}
{% assign menuLink = site.baseurl | append: item.path | append: "/" %}
{% if item.path contains "http://" or item.path contains "https://"%}
Expand Down
21 changes: 14 additions & 7 deletions src/_sass/components/_menu-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@
content: "";
display: block;
position: absolute;
top: 0;
left: -18px;
height: 100%;
top: -8px;
left: -19px;
height: calc(100% + 16px);
width: 2px;
background-color: color(primary);
}
Expand All @@ -116,9 +116,9 @@
content: "";
display: block;
position: absolute;
top: 0;
left: -26px;
height: 100%;
top: -8px;
left: -25px;
height: calc(100% + 16px);
width: 2px;
background-color: color(primary);
}
Expand Down Expand Up @@ -149,7 +149,14 @@

&#{$this}--gray {
& > #{$this}__link {
color: rgba(color(gray-dark), 0.8);
color: #435A6F;
font-weight: 500;
}
}

&#{$this}--green {
& > #{$this}__link {
color: color(primary);
font-weight: 500;
}
}
Expand Down