-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fix orange outline on global site search #1752
Conversation
3b453e9
to
222d515
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.gem-c-search__input[type="search"] { // overly specific to prevent some overrides from outside | ||
// stylelint-disable selector-max-id | ||
.gem-c-search__input[type="search"], | ||
#global-header .gem-c-search__input[type="search"] { // overly specific to prevent some overrides from outside |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awful we need this but until we get rid of govuk_template
styles we don't have a real alternative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes unfortunately we can't remove the conflicting styles from the govuk_template
repo itself so till we get rid of that dependency, this will have to do 😬
222d515
to
48dacec
Compare
app/assets/stylesheets/govuk_publishing_components/components/_search.scss
Outdated
Show resolved
Hide resolved
48dacec
to
69171a9
Compare
69171a9
to
5017abd
Compare
The global header was recently updated to use the search component instead of a hard coded search field. This resulted in an issue where the input outline is now orange due to more specific styles from govuk_template conflicting with the search component styles. This updates the component styles to be more specific in order to override the CSS from govuk_template. It uses the compatibility mixin to ensure the fix is only applied when in compatibility mode, and also to ensure the code is easier to clean up when compatibility mode is no longer a "thing".
5017abd
to
d58bafe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the review @36degrees, and for the work on this @danacotoran!
What
The global header was recently updated to use the search component instead of a hard coded search field.
This resulted in an issue where the input outline is now orange due to more specific styles from
govuk_template
conflicting with the search component styles.This updates the component styles to be more specific in order to override the CSS from
govuk_template
.Why
The site search input focus style has an orange outline due to
govuk_template
styles being more specific than the search component styles.The outline should match the focus style of the search button.
Visual Changes
Before
After
NOTE: as of the time this PR is being created the bug is not live, we caught the issue on staging.
https://trello.com/c/RbD3om74