Skip to content

Commit 51037af

Browse files
feat(): Adjust menu active state indicators (#664)
Co-authored-by: LRubin <sanscontext@users.noreply.github.com>
1 parent e891754 commit 51037af

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

src/_includes/menu/menu-item.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
{% assign currentSectionPage = page.path | downcase | split: "/" %}
3030
{% assign currentSectionPath = item.slug | downcase %}
3131
{% capture currentSectionSlug %}{{ currentSectionPage[0] | downcase }}/{{ currentSectionPage[1] | downcase }}{% endcapture %}
32-
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">
32+
33+
<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">
3434
{% if item.path %}
3535
{% assign menuLink = site.baseurl | append: item.path | append: "/" %}
3636
{% if item.path contains "http://" or item.path contains "https://"%}

src/_sass/components/_menu-item.scss

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@
101101
content: "";
102102
display: block;
103103
position: absolute;
104-
top: 0;
105-
left: -18px;
106-
height: 100%;
104+
top: -8px;
105+
left: -19px;
106+
height: calc(100% + 16px);
107107
width: 2px;
108108
background-color: color(primary);
109109
}
@@ -116,9 +116,9 @@
116116
content: "";
117117
display: block;
118118
position: absolute;
119-
top: 0;
120-
left: -26px;
121-
height: 100%;
119+
top: -8px;
120+
left: -25px;
121+
height: calc(100% + 16px);
122122
width: 2px;
123123
background-color: color(primary);
124124
}
@@ -149,7 +149,14 @@
149149

150150
&#{$this}--gray {
151151
& > #{$this}__link {
152-
color: rgba(color(gray-dark), 0.8);
152+
color: #435A6F;
153+
font-weight: 500;
154+
}
155+
}
156+
157+
&#{$this}--green {
158+
& > #{$this}__link {
159+
color: color(primary);
153160
font-weight: 500;
154161
}
155162
}

0 commit comments

Comments
 (0)