Skip to content

Commit 9a82375

Browse files
Fix non-rounded account outline in older Safari
1 parent d1ce5d7 commit 9a82375

File tree

1 file changed

+35
-8
lines changed

1 file changed

+35
-8
lines changed

packages/components/header/_index.scss

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use "sass:color";
12
@use "sass:math";
23
@use "../../core/objects" as *;
34
@use "../../core/settings" as *;
@@ -87,24 +88,44 @@ $_header-item-padding: 12px;
8788
/// Account
8889

8990
.nhsuk-header__account {
90-
background: nhsuk-shade($color_nhsuk-blue, 20%);
91+
position: relative;
9192
border-radius: $nhsuk-border-radius;
9293
flex-grow: 1;
93-
outline: 1px solid nhsuk-shade($color_nhsuk-blue, 20%);
9494
margin-bottom: 1px;
9595

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

107126
.nhsuk-header__account-list {
127+
position: relative;
128+
z-index: 1;
108129
display: flex;
109130
flex-wrap: wrap;
110131
gap: 1px;
@@ -115,7 +136,6 @@ $_header-item-padding: 12px;
115136
}
116137

117138
.nhsuk-header__account-item {
118-
background-color: nhsuk-shade($color_nhsuk-blue, 20%);
119139
display: flex;
120140
flex-grow: 1;
121141
gap: nhsuk-spacing(2);
@@ -455,8 +475,15 @@ $_header-item-padding: 12px;
455475
}
456476

457477
.nhsuk-header__account,
458-
.nhsuk-header__account-item {
478+
.nhsuk-header__account::before {
459479
background-color: $color_nhsuk-grey-5;
480+
}
481+
482+
.nhsuk-header__account::before {
483+
border-color: $color_nhsuk-grey-4;
484+
}
485+
486+
.nhsuk-header__account-item {
460487
outline-color: $color_nhsuk-grey-4;
461488
}
462489

0 commit comments

Comments
 (0)