Skip to content

Commit ab3c0bc

Browse files
Allow service name to wrap when header is inline
1 parent 34ede5b commit ab3c0bc

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

packages/nhsuk-frontend/src/nhsuk/components/header/_index.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ $nhsuk-header-reverse-item-active-colour: $nhsuk-reverse-text-colour;
124124
display: flex;
125125

126126
.nhsuk-header__container--inline & {
127+
flex-basis: 50%;
127128
flex-grow: 999;
128129
}
129130

@@ -203,6 +204,7 @@ $nhsuk-header-reverse-item-active-colour: $nhsuk-reverse-text-colour;
203204

204205
.nhsuk-header__account {
205206
flex-grow: 1;
207+
flex-shrink: 0;
206208

207209
margin-top: nhsuk-spacing(3);
208210

packages/nhsuk-frontend/src/nhsuk/components/header/fixtures.mjs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,12 @@ export const examples = {
115115
'with account inline (logged in)': {
116116
context: {
117117
containerClasses: 'nhsuk-header__container--inline',
118+
service: {
119+
text: 'Get a self-test kit for HIV',
120+
href: '#'
121+
},
118122
account: {
119123
items: [
120-
{
121-
href: '#',
122-
text: 'Account',
123-
icon: true
124-
},
125124
{
126125
action: '#',
127126
text: 'Log out'
@@ -156,6 +155,10 @@ export const examples = {
156155
'with account inline (logged out)': {
157156
context: {
158157
containerClasses: 'nhsuk-header__container--inline',
158+
service: {
159+
text: 'Get a self-test kit for HIV',
160+
href: '#'
161+
},
159162
account: {
160163
items: [
161164
{

0 commit comments

Comments
 (0)