Skip to content

Commit

Permalink
Merge pull request #77 from nhsuk/sidebar-spacing
Browse files Browse the repository at this point in the history
Side nav spacing + accessibility improvements
  • Loading branch information
mikemonteith authored May 9, 2024
2 parents 5d8e489 + 874bfa3 commit 909bce3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
10 changes: 1 addition & 9 deletions docs/_includes/layouts/component.njk
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,8 @@

{% set sidebar %}
{{ appSideNavigation({
classes: 'nhsuk-u-padding-top-6',
currentPath: page.url,
sections: [
{
heading: {
text: "Components"
},
items: collections.component
}
]
items: collections.component
}) }}
{% endset %}

Expand Down
1 change: 1 addition & 0 deletions docs/assets/css/_example.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

a:hover {
color: $nhsuk-link-hover-color;
text-decoration: none;
}

a:focus {
Expand Down
8 changes: 6 additions & 2 deletions docs/assets/css/components/_side-navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

display: block;
margin-left: - nhsuk-spacing(2);
padding: nhsuk-spacing(4) 0 0;
padding: nhsuk-spacing(6) 0 0;
}

.app-side-navigation__title {
@include nhsuk-font($size: 19);
color: $color_nhsuk-grey-2;
color: $color_nhsuk-grey-1;
font-weight: normal;
margin: 0;
padding: nhsuk-spacing(2);
Expand Down Expand Up @@ -40,6 +40,7 @@

a:hover {
color: $nhsuk-link-hover-color;
text-decoration: underline;
}

a:focus {
Expand Down Expand Up @@ -79,6 +80,9 @@
}

.app-side-navigation--mobile {
.app-side-navigation {
padding: 0 0 nhsuk-spacing(4);
}
@include mq($from: desktop) {
display: none;
}
Expand Down

0 comments on commit 909bce3

Please sign in to comment.