Skip to content

Commit e3a4714

Browse files
Use Sass modules
1 parent 3374378 commit e3a4714

42 files changed

Lines changed: 229 additions & 143 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,10 @@
11
@use "sass:color";
22

3-
// Configure and import GOV.UK Frontend
4-
$govuk-font-family: "Frutiger W01", Arial, sans-serif;
5-
$govuk-border-colour: #d8dde0;
6-
$govuk-brand-colour: #005eb8;
7-
$govuk-error-colour: #d5281b;
8-
$govuk-success-colour: #007f3b;
9-
$govuk-global-styles: false;
10-
$govuk-new-organisation-colours: true;
11-
$govuk-assets-path: "/";
3+
// NHS.UK frontend components
4+
@forward "vendor/nhsuk-frontend";
125

13-
@import "vendor/govuk-frontend";
14-
15-
// Configure and import NHS.UK frontend
16-
$nhsuk-fonts-path: "/";
17-
$nhsuk-grid-widths: (
18-
one-quarter: 25%,
19-
one-third: 33.3333%,
20-
one-half: 50%,
21-
two-thirds: 66.6666%,
22-
three-quarters: 75%,
23-
full: 100%,
24-
filters: 30%,
25-
results: 70%,
26-
);
27-
28-
@import "vendor/nhsuk-frontend";
29-
30-
// App options
31-
$app-page-width: 1100px;
32-
$color_app-dark-orange: color.scale(
33-
color.mix($color_nhsuk-red, $color_nhsuk-warm-yellow, 55%),
34-
$lightness: -10%
35-
);
36-
37-
// Import GOV.UK Frontend components (updated to use NHS.UK frontend styles)
38-
@import "vendor/govuk-frontend/components/file-upload";
39-
@import "vendor/govuk-frontend/components/password-input";
6+
// GOV.UK Frontend components
7+
@forward "vendor/govuk-frontend";
408

419
// App-specific components
42-
@import "core";
43-
@import "components";
44-
45-
// `$nhsuk-page-width` isn’t globally editable, so need to apply manually
46-
.app-signed-in {
47-
.nhsuk-width-container,
48-
.nhsuk-header__container,
49-
.nhsuk-navigation {
50-
max-width: $app-page-width;
51-
52-
@include nhsuk-media-query($from: desktop) {
53-
margin: 0 $nhsuk-gutter;
54-
}
55-
56-
@include nhsuk-media-query(
57-
$and: "(min-width: #{($app-page-width + $nhsuk-gutter * 2)})"
58-
) {
59-
margin: 0 auto;
60-
}
61-
}
62-
}
10+
@forward "components";

app/assets/stylesheets/components/_action-list.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "../vendor/nhsuk-frontend" as *;
2+
13
.app-action-list {
24
display: flex;
35
padding: 0;

app/assets/stylesheets/components/_add-another.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "../vendor/nhsuk-frontend" as *;
2+
13
$_counter-size: 2rem;
24

35
.app-add-another {

app/assets/stylesheets/components/_autocomplete.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "../vendor/nhsuk-frontend" as *;
2+
13
.app-autocomplete__wrapper {
24
position: relative;
35
}

app/assets/stylesheets/components/_button-group.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "../vendor/nhsuk-frontend" as *;
2+
13
.app-button-group {
24
align-items: center;
35
display: flex;

app/assets/stylesheets/components/_button.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@use "sass:color";
2+
@use "../vendor/nhsuk-frontend" as *;
23

34
$_button-shadow-size: $nhsuk-border-width-form-element * 2;
45
$_secondary-warning-button-hover-color: color.change(

app/assets/stylesheets/components/_card.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
@use "../vendor/nhsuk-frontend" as *;
2+
@use "../core" as app;
3+
14
.app-card {
25
&--aqua-green {
36
.nhsuk-card__heading--feature {
@@ -7,7 +10,7 @@
710

811
&--dark-orange {
912
.nhsuk-card__heading--feature {
10-
background-color: $color_app-dark-orange;
13+
background-color: app.$color_dark-orange;
1114
}
1215
}
1316

app/assets/stylesheets/components/_count.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@use "sass:color";
2+
@use "../vendor/nhsuk-frontend" as *;
23

34
.app-count {
45
background-color: color.scale(

app/assets/stylesheets/components/_dev-tools.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "../vendor/nhsuk-frontend" as *;
2+
13
.app-dev-tools {
24
background-color: $color_nhsuk-pale-yellow;
35
background-image: linear-gradient(

app/assets/stylesheets/components/_environment.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "../vendor/nhsuk-frontend" as *;
2+
13
.app-environment {
24
@include nhsuk-font-size(14);
35
@include nhsuk-responsive-padding(2, bottom);

0 commit comments

Comments
 (0)