Skip to content

Commit 6bdddeb

Browse files
authored
Merge pull request #3287 from TechnologyEnhancedLearning/Develop/Fixes/TD-4916-nhsuk-override-consolidation
TD-4916 nhsuk override consolidation
2 parents 95a3da4 + 63a4e27 commit 6bdddeb

File tree

9 files changed

+292
-293
lines changed

9 files changed

+292
-293
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,3 +512,5 @@ DigitalLearningSolutions.Web/Views/Shared/Components/SelectList/Default.cshtml
512512
DigitalLearningSolutions.Web/Views/Shared/Components/SingleCheckbox/Default.cshtml
513513
DigitalLearningSolutions.Web/Views/Shared/Components/TextArea/Default.cshtml
514514
DigitalLearningSolutions.Web/Views/Shared/Components/TextInput/Default.cshtml
515+
/DigitalLearningSolutions.Web/appsettings.Test.json
516+
/DigitalLearningSolutions.Web/web.config

DigitalLearningSolutions.Web/Styles/index.scss

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,7 @@ ul > li > ul > li {
6262
padding-top: 0;
6363
}
6464

65-
.nhsuk-button {
66-
@include mq($until: tablet) {
67-
margin-top: nhsuk-spacing(3);
68-
}
69-
}
65+
7066

7167
input:invalid {
7268
border: $nhsuk-border-width-form-element-error solid $nhsuk-error-color;
@@ -78,13 +74,7 @@ input[type=file] {
7874
}
7975
}
8076

81-
input[type=file].nhsuk-input--error {
82-
height: 44px;
8377

84-
@include govuk-media-query($until: tablet) {
85-
height: 40px;
86-
}
87-
}
8878

8979
h1#page-heading {
9080
margin-bottom: 16px;
@@ -98,9 +88,6 @@ h1#page-heading {
9888
display: flex;
9989
}
10090

101-
.nhsuk-main-wrapper {
102-
flex: 1;
103-
}
10491

10592
.responsive-iframe-wrapper {
10693
height: 100%;
@@ -121,10 +108,6 @@ h1#page-heading {
121108
padding-bottom: $iframe-padding-bottom * 1.5;
122109
}
123110

124-
.nhsuk-heading-xl.heading-margin-2 {
125-
margin-bottom: nhsuk-spacing(2);
126-
}
127-
128111
.responsive-iframe {
129112
width: 100%;
130113
height: 100%;
@@ -147,25 +130,6 @@ h1#page-heading {
147130
margin-bottom: 0;
148131
}
149132

150-
.basic-summary-list__row:last-child .nhsuk-summary-list__key {
151-
border: none;
152-
}
153-
154-
.basic-summary-list__row:last-child .nhsuk-summary-list__value {
155-
border: none;
156-
margin-bottom: 0;
157-
}
158-
159-
.nhsuk-summary-list__value {
160-
@include govuk-media-query($until: tablet) {
161-
word-break: break-word;
162-
@include word-break-ie-fix;
163-
}
164-
}
165-
166-
.nhsuk-tag {
167-
text-align: center;
168-
}
169133

170134
.right-align-tag-column {
171135
padding: 0;
@@ -211,10 +175,6 @@ ul.no-bullets {
211175
margin-bottom: 0;
212176
}
213177

214-
.nhsuk-details__text > .nhsuk-button {
215-
margin-bottom: 0;
216-
}
217-
218178
@mixin hidden-submit-ie-fix {
219179
// IE11 hack
220180
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
@@ -335,10 +295,6 @@ ul.no-bullets {
335295
}
336296
}
337297

338-
.nhsuk-error-message.error-message--margin-bottom-1 {
339-
margin-bottom: nhsuk-spacing(1);
340-
}
341-
342298
.display-none {
343299
display: none;
344300
}

DigitalLearningSolutions.Web/Styles/layout.scss

Lines changed: 1 addition & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -14,84 +14,14 @@ body {
1414
}
1515

1616
#pagewrapper {
17-
display: flex;
18-
flex-direction: column;
1917
height: 100%;
2018
min-height: 100vh;
2119
}
2220

23-
#maincontentwrapper {
24-
flex: 1 0 auto;
25-
align-self: center;
26-
width: 100%;
27-
margin: 0;
28-
}
29-
3021
footer {
3122
flex-shrink: 0;
3223
}
3324

34-
.nhsuk-header__navigation-item.selected {
35-
a {
36-
font-weight: bold;
37-
}
38-
}
39-
40-
.nhsuk-header__logo {
41-
@include mq($until: large-desktop) {
42-
max-width: unset;
43-
44-
.nhsuk-header__link--service {
45-
align-items: center;
46-
display: flex;
47-
-ms-flex-align: center;
48-
margin-bottom: 0;
49-
width: auto;
50-
}
51-
52-
.nhsuk-header__service-name {
53-
padding-left: nhsuk-spacing(3);
54-
max-width: unset;
55-
}
56-
}
57-
}
58-
.nhsuk-navigation-container {
59-
@include mq($until: tablet) {
60-
margin-top: unset;
61-
}
62-
}
63-
64-
body:not(.js-enabled) {
65-
.nhsuk-header__menu {
66-
display: none;
67-
}
68-
69-
#close-menu {
70-
display: none;
71-
}
72-
73-
.nhsuk-header__navigation {
74-
display: block;
75-
}
76-
}
77-
78-
:not(.nhsuk-header--transactional) div.nhsuk-header__container {
79-
@media (max-width: 40.0525em) {
80-
margin: 0;
81-
}
82-
}
83-
84-
.nhsuk-header--transactional {
85-
.nhsuk-header__link--service {
86-
width: auto;
87-
height: auto;
88-
89-
@include mq($from: large-desktop) {
90-
display: flex;
91-
}
92-
}
93-
}
94-
9525
.centre-brand-logo {
9626
float: right;
9727
max-width: 280px;
@@ -102,14 +32,6 @@ body:not(.js-enabled) {
10232
}
10333
}
10434

105-
nav .nhsuk-width-container {
106-
margin: 0 auto;
107-
}
108-
109-
nav, .nhsuk-header__navigation, #header-navigation {
110-
border-bottom: 0;
111-
}
112-
11335
.visual-separator {
11436
height: 8px;
11537
width: 100%;
@@ -307,19 +229,7 @@ nav, .nhsuk-header__navigation, #header-navigation {
307229
clip: auto;
308230
}
309231

310-
.nhsuk-button--danger {
311-
background-color: $color_nhsuk-red;
312-
box-shadow: 0 4px 0 shade($color_nhsuk-red, 50%);
313-
margin-bottom: 16px !important;
314232

315-
&:hover {
316-
background-color: shade($color_nhsuk-red, 20%);
317-
}
318-
319-
&:active {
320-
background-color: shade($color_nhsuk-red, 50%);
321-
}
322-
}
323233

324234
.first-row td {
325235
border-top: 2px solid #d8dde0;
@@ -330,12 +240,6 @@ nav, .nhsuk-header__navigation, #header-navigation {
330240
white-space: nowrap;
331241
}
332242

333-
.nhsuk-header__link--service {
334-
@include mq($from: large-desktop) {
335-
align-items: unset;
336-
}
337-
}
338-
339243
.header-beta {
340244
color: #c8e4ff;
341245
font-family: FrutigerLTW01-55Roman, Arial, sans-serif;
@@ -347,15 +251,8 @@ nav, .nhsuk-header__navigation, #header-navigation {
347251
}
348252
}
349253

350-
.nhsuk-width-container, .nhsuk-header__navigation-list {
351-
max-width: 1144px !important;
352-
padding-left: $nhsuk-gutter !important;
353-
padding-right: $nhsuk-gutter !important;
354-
}
355254

356-
.nhsuk-width-container {
357-
margin: auto !important;
358-
}
255+
359256

360257
@media only screen and (max-width: 767px) {
361258
.section-card-result {

DigitalLearningSolutions.Web/Styles/nhsuk.scss

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,143 @@
77
.nhsuk-hint {
88
white-space: initial;
99
}
10+
11+
12+
@mixin word-break-ie-fix {
13+
// IE11 hack
14+
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
15+
word-break: break-all;
16+
}
17+
}
18+
19+
/* Items below moved from layout.scss or index.scss and deemed to be part of NHSE frontend */
20+
21+
body:not(.js-enabled) {
22+
.nhsuk-header__menu {
23+
display: none;
24+
}
25+
26+
#close-menu {
27+
display: none;
28+
}
29+
30+
.nhsuk-header__navigation {
31+
display: block;
32+
}
33+
}
34+
35+
/* nhsuk-header__navigation-item paired with menu li items that become bold when you're on that page */
36+
/* <li class="nhsuk-header__navigation-item @Html.GetSelectedCssClassIfTabSelected(NavMenuTab.Dashboard)"> */
37+
.nhsuk-header__navigation-item.selected {
38+
a {
39+
font-weight: bold;
40+
}
41+
}
42+
43+
/* stops blue menu overlapping white header, noticable because it's white, not as noticable in blue headers */
44+
.nhsuk-header--white .nhsuk-navigation-container {
45+
@include mq($until: tablet) {
46+
margin-top: unset;
47+
}
48+
}
49+
50+
/* .nhsuk-header--transactional brought from live design-system, not in current implentation */
51+
.nhsuk-header--transactional {
52+
.nhsuk-header__container {
53+
justify-content: normal;
54+
}
55+
56+
.nhsuk-header__link {
57+
display: block;
58+
height: 32px;
59+
width: 80px
60+
}
61+
62+
.nhsuk-logo {
63+
height: 32px;
64+
width: 80px
65+
}
66+
}
67+
68+
.nhsuk-main-wrapper {
69+
flex: 1;
70+
}
71+
72+
.feedback-bar .nhsuk-width-container {
73+
margin-bottom: 0;
74+
}
75+
76+
nav, .nhsuk-header__navigation, #header-navigation {
77+
border-bottom: 0;
78+
}
79+
80+
.nhsuk-heading-xl.heading-margin-2 {
81+
margin-bottom: nhsuk-spacing(2);
82+
}
83+
84+
.nhsuk-button {
85+
@include mq($until: tablet) {
86+
margin-top: nhsuk-spacing(3);
87+
}
88+
}
89+
90+
.nhsuk-button--danger {
91+
background-color: $color_nhsuk-red;
92+
box-shadow: 0 4px 0 shade($color_nhsuk-red, 50%);
93+
margin-bottom: 16px !important;
94+
95+
&:hover {
96+
background-color: shade($color_nhsuk-red, 20%);
97+
}
98+
99+
&:active {
100+
background-color: shade($color_nhsuk-red, 50%);
101+
}
102+
}
103+
104+
.nhsuk-details__text > .nhsuk-button {
105+
margin-bottom: 0;
106+
}
107+
108+
input[type=file].nhsuk-input--error {
109+
height: 44px;
110+
111+
@include govuk-media-query($until: tablet) {
112+
height: 40px;
113+
}
114+
}
115+
116+
.nhsuk-error-message.error-message--margin-bottom-1 {
117+
margin-bottom: nhsuk-spacing(1);
118+
}
119+
120+
.basic-summary-list__row:last-child .nhsuk-summary-list__key {
121+
border: none;
122+
}
123+
124+
.basic-summary-list__row:last-child .nhsuk-summary-list__value {
125+
border: none;
126+
margin-bottom: 0;
127+
}
128+
129+
.nhsuk-summary-list__value {
130+
@include govuk-media-query($until: tablet) {
131+
word-break: break-word;
132+
@include word-break-ie-fix;
133+
}
134+
}
135+
136+
.nhsuk-tag {
137+
text-align: center;
138+
}
139+
140+
141+
142+
/*
143+
styles/index.scss has the following nhsuk dependancies - FGC 2/6/25
144+
.nhsuk-u-font-weight-normal;
145+
.nhsuk-u-font-weight-bold;
146+
.nhsuk-u-font-size-16;
147+
.nhsuk-u-font-size-19;
148+
*/
149+

0 commit comments

Comments
 (0)