Skip to content

Ensure focused search input in header renders consistently across breakpoints #1317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 27, 2025
11 changes: 11 additions & 0 deletions packages/components/header/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,17 @@ $_header-item-padding: 12px;
opacity: 1; // Fixes low contrast of placeholder text in firefox
}

// Hide search input clear button (IE)
&::-ms-clear {
display: none;
}

// Hide search input icon and cancel button (WebKit, Blink)
&::-webkit-search-decoration,
&::-webkit-search-cancel-button {
appearance: none;
}

Comment on lines +222 to +232
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When text is entered we should remove the "clear" icon

Although the icon wasn't visible by default, space was still reserved for it

@include nhsuk-media-query($until: tablet) {
font-size: inherit;
}
Expand Down