Skip to content

Commit ce2ca3f

Browse files
Combine service and transactionalService header options and remove header layout switches
1 parent 2e93f62 commit ce2ca3f

12 files changed

+235
-576
lines changed

app/components/header/header-transactional-service-name.njk renamed to app/components/header/header-service-name-long.njk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{% set html_style = 'background-color: #f0f4f5;' %}
2-
{% set title = 'Header transactional with service name' %}
2+
{% set title = 'Header transactional with a long service name' %}
33
{% from 'components/header/macro.njk' import header %}
44
{% extends 'layout.njk' %}
55

66
{% block body %}
77

88
{{ header({
9-
"transactionalService": {
10-
"name": "Find your NHS number"
9+
"service": {
10+
"name": "Find your really long service name in England"
1111
},
1212
"showNav": "false",
1313
"showSearch": "false"

app/components/header/header-service-name-with-nav.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
{{ header({
99
"service": {
10-
"name": "Digital service manual"
10+
"name": "Find your really long service name in England"
1111
},
1212
"showNav": "true",
1313
"showSearch": "true",

app/pages/examples.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@
7979
<li><a href="../components/header/header-search.html">Header with search</a></li>
8080
<li><a href="../components/header/header-logo.html">Header with logo only</a></li>
8181
<li><a href="../components/header/header-service-name.html">Header with a service name</a></li>
82+
<li><a href="../components/header/header-service-name-long.html">Header with a long service name</a></li>
8283
<li><a href="../components/header/header-service-name-with-nav.html">Header with a service name, search and navigation</a></li>
83-
<li><a href="../components/header/header-transactional-service-name.html">Header transactional with service name</a></li>
8484
<li><a href="../components/header/header-org.html">Header organisational</a></li>
8585
<li><a href="../components/header/header-org-white.html">Header organisational with white header</a></li>
8686
<li><a href="../components/header/header-org-white-nav.html">Header organisational with white header and navigation</a></li>

packages/components/header/README.md

Lines changed: 89 additions & 100 deletions
Large diffs are not rendered by default.

packages/components/header/_header-organisation.scss

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,15 @@
11
/**
2-
* These are the styles for the organisation header variants.
3-
*/
2+
* Organisation header variant.
3+
*/
44

55
.nhsuk-header--organisation {
6-
.nhsuk-header__link {
7-
height: auto;
8-
text-decoration: none;
9-
width: auto;
10-
11-
&:hover {
12-
color: $color_nhsuk-white;
13-
text-decoration: underline;
14-
15-
.nhsuk-logo {
16-
box-shadow: none;
17-
}
18-
}
19-
20-
&:focus {
21-
background: $nhsuk-focus-color;
22-
box-shadow:
23-
0 0 0 $nhsuk-focus-width $nhsuk-focus-color,
24-
0 $nhsuk-focus-width 0 $nhsuk-focus-width $nhsuk-focus-text-color;
25-
26-
.nhsuk-organisation-name,
27-
.nhsuk-organisation-descriptor {
28-
color: $nhsuk-focus-text-color;
29-
}
30-
31-
.nhsuk-logo {
32-
box-shadow: none;
33-
}
34-
35-
&:hover {
36-
text-decoration: none;
37-
}
38-
}
6+
.nhsuk-header__link:hover {
7+
box-shadow: none;
398
}
409

41-
.nhsuk-header__logo .nhsuk-logo {
10+
.nhsuk-logo {
4211
@include nhsuk-logo-size-small;
12+
display: inline-block;
4313

4414
@media (max-width: 450px) {
4515
height: nhsuk-spacing(4);
@@ -58,7 +28,6 @@
5828
}
5929

6030
.nhsuk-organisation-name {
61-
color: $color_nhsuk-white;
6231
display: block;
6332
font-size: 22px;
6433
font-weight: bold;
@@ -87,7 +56,6 @@
8756
}
8857

8958
.nhsuk-organisation-descriptor {
90-
color: $color_nhsuk-white;
9159
display: block;
9260
font-size: 15px;
9361
font-weight: bold;

packages/components/header/_header-service.scss

Lines changed: 0 additions & 59 deletions
This file was deleted.

packages/components/header/_header-transactional.scss

Lines changed: 0 additions & 61 deletions
This file was deleted.

packages/components/header/_header-white.scss

Lines changed: 32 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,49 @@
11
/**
2-
* These are the styles for the white header variants.
3-
*/
2+
* White header variant.
3+
*/
44

55
.nhsuk-header--white {
66
background-color: $color_nhsuk-white;
77

8-
.nhsuk-header__search-wrap {
9-
margin-bottom: nhsuk-spacing(3);
8+
.nhsuk-header__link {
9+
@include nhsuk-link-style-no-visited-state;
1010

11-
@include mq($until: tablet) {
12-
&::after {
13-
background: $color_nhsuk-white;
11+
&:focus {
12+
.nhsuk-logo,
13+
.nhsuk-organisation-descriptor {
14+
color: inherit;
1415
}
1516
}
16-
}
1717

18-
.nhsuk-navigation-container {
19-
background-color: $color_nhsuk-blue;
20-
}
18+
&:hover {
19+
color: $nhsuk-text-color;
2120

22-
.nhsuk-logo {
23-
.nhsuk-logo__background {
24-
fill: $color_nhsuk-blue;
21+
.nhsuk-organisation-descriptor {
22+
color: $nhsuk-text-color;
23+
}
2524
}
25+
}
2626

27-
.nhsuk-logo__text {
28-
fill: $color_nhsuk-white;
29-
}
27+
.nhsuk-logo {
28+
color: $color_nhsuk-blue;
3029
}
3130

32-
.nhsuk-header__link {
33-
&:hover {
34-
color: $nhsuk-text-color;
35-
text-decoration: underline;
31+
.nhsuk-organisation-name {
32+
color: $color_nhsuk-black;
33+
}
3634

37-
.nhsuk-organisation-descriptor {
38-
color: $nhsuk-text-color;
35+
.nhsuk-header__search-wrap {
36+
@include mq($until: tablet) {
37+
&::after {
38+
background-color: $color_nhsuk-white;
3939
}
4040
}
4141
}
4242

43+
.nhsuk-navigation-container {
44+
background-color: $color_nhsuk-blue;
45+
}
46+
4347
.nhsuk-search__submit {
4448
background-color: $color_nhsuk-blue;
4549

@@ -62,49 +66,28 @@
6266
}
6367

6468
.nhsuk-search__input {
65-
border: 1px solid $color_nhsuk-grey-3;
69+
border-color: $color_nhsuk-grey-3;
6670

6771
&:focus {
68-
border: 2px solid $nhsuk-focus-text-color;
72+
border-color: $nhsuk-focus-text-color;
6973

7074
@include mq($until: tablet) {
71-
border: $nhsuk-focus-width solid $nhsuk-focus-text-color;
75+
border-color: $nhsuk-focus-text-color;
7276
}
7377
}
7478
}
75-
76-
.nhsuk-header__search-form {
77-
@include mq($until: tablet) {
78-
padding-top: 0;
79-
}
80-
}
81-
82-
.nhsuk-organisation-name {
83-
color: shade($color_nhsuk-black, 100%);
84-
}
85-
86-
.nhsuk-organisation-descriptor {
87-
color: $color_nhsuk-blue;
88-
}
89-
90-
.nhsuk-header__transactional-service-name--link {
91-
color: $color_nhsuk-black;
92-
}
93-
94-
.nhsuk-header__service-name {
95-
color: $nhsuk-text-color;
96-
}
9779
}
9880

9981
.nhsuk-header--white-nav {
10082
.nhsuk-navigation-container {
10183
background-color: $color_nhsuk-white;
10284
}
85+
10386
.nhsuk-navigation {
10487
background-color: $color_nhsuk-white;
10588

10689
.nhsuk-header__navigation-list {
107-
border-top: 1px solid $color_nhsuk-grey-5;
90+
border-top-color: $color_nhsuk-grey-5;
10891
}
10992

11093
.nhsuk-header__navigation-link {

0 commit comments

Comments
 (0)