Skip to content

Commit

Permalink
Hide toggle link when JS disabled (related nav)
Browse files Browse the repository at this point in the history
When JS is disabled, we want to expand all content normally hidden behind a toggle, and hide the toggle link.
  • Loading branch information
Vanita Barrett committed Oct 3, 2018
1 parent 2432e24 commit b3d97eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Expand Up @@ -36,6 +36,14 @@
}
}

.gem-c-related-navigation__toggle {
display: none;

.js-enabled & {
display: block;
}
}

.gem-c-related-navigation__section-link {
@include bold-16;
}
Expand Down
Expand Up @@ -44,6 +44,7 @@
<% if links.length > section_link_limit %>
<li class="gem-c-related-navigation__link toggle-wrap">
<a href="#"
class="gem-c-related-navigation__toggle"
data-controls="toggle_<%= section_title %>"
data-expanded="false"
data-toggled-text="<%= t("govuk_component.metadata.toggle_less", default: "Show fewer") %>">
Expand Down

0 comments on commit b3d97eb

Please sign in to comment.