Skip to content

Commit

Permalink
Clean up search box outline
Browse files Browse the repository at this point in the history
This removes the default outline of the search box, which had curved edges
(going against the Playbook's implicit design principles) and was partially
obscured by the search button

Instead, since the input and button are tightly coupled (visually and
conceptually), the entire search form is outlined when focusing within the
search box, with a cleaner design using one of our brand colours. This is the
same colour as used for underlining links, so the colour consistently signals
a location of (potential) action (clicking a link; searching the playbook)
  • Loading branch information
yndajas committed Nov 24, 2022
1 parent 2107888 commit 9eb797b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/_sass/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
.search-form {
display: flex;

&:focus-within {
outline: solid 0.1875rem colours.$blue-light;
}

&__input {
background-color: colours.$ivory;
border: 0.063rem solid colours.$navy;
Expand All @@ -11,6 +15,10 @@
margin-right: -0.063rem;
padding: 0.5rem 0.938rem;
width: 100%;

&:focus {
outline: none;
}
}

&__submit {
Expand Down

0 comments on commit 9eb797b

Please sign in to comment.