Skip to content

Commit 2d81921

Browse files
committed
Auto merge of #3077 - Turbo87:focus-style, r=locks
Header: Use custom focus styling The current focus outline is using a rectangle, while the input is rounded, which looks very ugly. This commit uses a `box-shadow` instead of the regular `outline` to solve this issue. Before: <img width="426" alt="Bildschirmfoto 2020-12-06 um 15 45 59" src="https://user-images.githubusercontent.com/141300/101283370-2c443d80-37da-11eb-905f-191ea5cd9dad.png"> After: <img width="340" alt="Bildschirmfoto 2020-12-06 um 15 44 37" src="https://user-images.githubusercontent.com/141300/101283348-0ae35180-37da-11eb-87c1-544d0c9d093f.png"> <img width="958" alt="Bildschirmfoto 2020-12-06 um 15 44 55" src="https://user-images.githubusercontent.com/141300/101283351-0cad1500-37da-11eb-89f5-4ef3c7316808.png"> r? `@locks`
2 parents be5d83f + 8f3b07f commit 2d81921

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/components/header.module.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ input.search {
5858
background-size: 14px 15px;
5959
border-radius: 15px;
6060
box-shadow: none;
61+
transition: box-shadow 150ms;
62+
63+
&:focus {
64+
outline: none;
65+
box-shadow: 0 0 0 4px var(--yellow);
66+
}
6167
}
6268

6369
.mobile-search {

0 commit comments

Comments
 (0)