Skip to content

Commit 113b990

Browse files
Fix non-rounded account outline in older Safari
1 parent d1ce5d7 commit 113b990

File tree

1 file changed

+34
-8
lines changed

1 file changed

+34
-8
lines changed

packages/components/header/_index.scss

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,24 +87,44 @@ $_header-item-padding: 12px;
8787
/// Account
8888

8989
.nhsuk-header__account {
90-
background: nhsuk-shade($color_nhsuk-blue, 20%);
90+
position: relative;
9191
border-radius: $nhsuk-border-radius;
9292
flex-grow: 1;
93-
outline: 1px solid nhsuk-shade($color_nhsuk-blue, 20%);
9493
margin-bottom: 1px;
9594

96-
@include nhsuk-media-query($from: tablet) {
97-
align-self: start;
98-
}
99-
10095
.nhsuk-icon__user {
10196
height: 24px;
10297
width: 24px;
10398
flex-shrink: 0;
10499
}
100+
101+
&,
102+
&::before {
103+
background-color: nhsuk-shade($color_nhsuk-blue, 20%);
104+
}
105+
106+
// Expand header account by 1px to ensure the search
107+
// input does not appear to be taller when inline
108+
&::before {
109+
content: "";
110+
display: block;
111+
position: absolute;
112+
top: -1px;
113+
right: 0;
114+
bottom: -1px;
115+
left: 0;
116+
border: 1px solid nhsuk-shade($color_nhsuk-blue, 20%);
117+
border-radius: $nhsuk-border-radius + 1px;
118+
}
119+
120+
@include nhsuk-media-query($from: tablet) {
121+
align-self: start;
122+
}
105123
}
106124

107125
.nhsuk-header__account-list {
126+
position: relative;
127+
z-index: 1;
108128
display: flex;
109129
flex-wrap: wrap;
110130
gap: 1px;
@@ -115,7 +135,6 @@ $_header-item-padding: 12px;
115135
}
116136

117137
.nhsuk-header__account-item {
118-
background-color: nhsuk-shade($color_nhsuk-blue, 20%);
119138
display: flex;
120139
flex-grow: 1;
121140
gap: nhsuk-spacing(2);
@@ -455,8 +474,15 @@ $_header-item-padding: 12px;
455474
}
456475

457476
.nhsuk-header__account,
458-
.nhsuk-header__account-item {
477+
.nhsuk-header__account::before {
459478
background-color: $color_nhsuk-grey-5;
479+
}
480+
481+
.nhsuk-header__account::before {
482+
border-color: $color_nhsuk-grey-4;
483+
}
484+
485+
.nhsuk-header__account-item {
460486
outline-color: $color_nhsuk-grey-4;
461487
}
462488

0 commit comments

Comments
 (0)