Skip to content

Commit

Permalink
Move NHS.UK component css into nhsuk.css (#120)
Browse files Browse the repository at this point in the history
This moves the `.nhsuk-list--border` and `.nhsuk-related-nav` css into
the `nhsuk.scss` file, along with the other NHS website-only CSS.

This means that the compiled `main.css` file is slightly smaller, as
that doesn’t use those 2 components, and the code is only used in the
example nhsu.uk template pages, which include the additional compiled
`nhsuk.css` file.

A minor bit of tidying-up, but should help us be less confused in
future.
  • Loading branch information
frankieroberto authored Nov 18, 2024
1 parent 66f9ce4 commit a3c39df
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 37 deletions.
8 changes: 0 additions & 8 deletions app/assets/sass/components/_list-border.scss

This file was deleted.

25 changes: 0 additions & 25 deletions app/assets/sass/components/_related-nav.scss

This file was deleted.

2 changes: 0 additions & 2 deletions app/assets/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
@import 'node_modules/nhsuk-frontend/packages/nhsuk';

// Components that are not in the NHS.UK frontend library
@import 'components/list-border';
@import 'components/related-nav';
@import 'components/figure';

///////////////////////////////////////////
Expand Down
46 changes: 44 additions & 2 deletions app/assets/sass/nhsuk.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
@import 'node_modules/nhsuk-frontend/packages/core/settings/colours';
@import 'node_modules/nhsuk-frontend/packages/core/settings/all';
@import 'node_modules/nhsuk-frontend/packages/core/tools/all';

// NHS.UK website template styles
//
// This CSS is all used to re-create some of the NHS.UK website
// styles within the example templates. It will likely need updating
// as the NHS.UK website updates.

// ==========================================================================
// Log in link
Expand Down Expand Up @@ -92,7 +99,7 @@
}
}


// ==========================================================================
// Feedback form
// ==========================================================================
Expand Down Expand Up @@ -600,3 +607,38 @@ main .app-list-signage a[href=""]:focus {
main .app-list-signage a[href=""] {
color: $color_nhsuk-white;
}

// ==========================================================================
// COMPONENTS / #RELATED-NAV
// ==========================================================================

.nhsuk-related-nav {
border-top: 1px solid $nhsuk-border-color;

@include mq($until: desktop) {
margin-top: nhsuk-spacing(7);
}
}

.nhsuk-related-nav__heading {
@include nhsuk-typography-responsive(19, $override-line-height: 1.2);

margin-bottom: 12px;
padding-top: nhsuk-spacing(3);
}

.nhsuk-related-nav__list {
@include nhsuk-typography-responsive(16);

list-style: none;
padding-left: 0;
}

// ==========================================================================
// COMPONENTS / #LIST-BORDER
// ==========================================================================

.nhsuk-list--border li {
border-bottom: 1px solid $color_nhsuk-grey-4;
padding: 8px 0 16px;
}

0 comments on commit a3c39df

Please sign in to comment.