Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/itchy-jokes-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': patch
---

Changes the focus styling of input components such as `Textarea`, `TextInput`, `TextInputWithTokens` and `Select` from using `border` and `box-shadow` to use `outline` only for better border rendering and scrollbar support.
35 changes: 21 additions & 14 deletions src/__tests__/__snapshots__/Autocomplete.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ exports[`snapshots renders a custom empty state message 1`] = `
-ms-flex-align: stretch;
align-items: stretch;
min-height: 32px;
overflow: hidden;
}

.c0 input,
Expand Down Expand Up @@ -50,8 +51,8 @@ exports[`snapshots renders a custom empty state message 1`] = `

.c0:focus-within {
border-color: #0969da;
outline: none;
box-shadow: inset 0 0 0 1px #0969da;
outline: 2px solid #0969da;
outline-offset: -1px;
}

.c0 > textarea {
Expand Down Expand Up @@ -187,6 +188,7 @@ exports[`snapshots renders a loading state 1`] = `
-ms-flex-align: stretch;
align-items: stretch;
min-height: 32px;
overflow: hidden;
}

.c0 input,
Expand Down Expand Up @@ -216,8 +218,8 @@ exports[`snapshots renders a loading state 1`] = `

.c0:focus-within {
border-color: #0969da;
outline: none;
box-shadow: inset 0 0 0 1px #0969da;
outline: 2px solid #0969da;
outline-offset: -1px;
}

.c0 > textarea {
Expand Down Expand Up @@ -388,6 +390,7 @@ exports[`snapshots renders a menu that contains an item to add to the menu 1`] =
-ms-flex-align: stretch;
align-items: stretch;
min-height: 32px;
overflow: hidden;
}

.c0 input,
Expand Down Expand Up @@ -417,8 +420,8 @@ exports[`snapshots renders a menu that contains an item to add to the menu 1`] =

.c0:focus-within {
border-color: #0969da;
outline: none;
box-shadow: inset 0 0 0 1px #0969da;
outline: 2px solid #0969da;
outline-offset: -1px;
}

.c0 > textarea {
Expand Down Expand Up @@ -1165,6 +1168,7 @@ exports[`snapshots renders a multiselect input 1`] = `
-ms-flex-align: stretch;
align-items: stretch;
min-height: 32px;
overflow: hidden;
}

.c0 input,
Expand Down Expand Up @@ -1194,8 +1198,8 @@ exports[`snapshots renders a multiselect input 1`] = `

.c0:focus-within {
border-color: #0969da;
outline: none;
box-shadow: inset 0 0 0 1px #0969da;
outline: 2px solid #0969da;
outline-offset: -1px;
}

.c0 > textarea {
Expand Down Expand Up @@ -1829,6 +1833,7 @@ exports[`snapshots renders a multiselect input with selected menu items 1`] = `
-ms-flex-align: stretch;
align-items: stretch;
min-height: 32px;
overflow: hidden;
}

.c0 input,
Expand Down Expand Up @@ -1858,8 +1863,8 @@ exports[`snapshots renders a multiselect input with selected menu items 1`] = `

.c0:focus-within {
border-color: #0969da;
outline: none;
box-shadow: inset 0 0 0 1px #0969da;
outline: 2px solid #0969da;
outline-offset: -1px;
}

.c0 > textarea {
Expand Down Expand Up @@ -2641,6 +2646,7 @@ exports[`snapshots renders a single select input 1`] = `
-ms-flex-align: stretch;
align-items: stretch;
min-height: 32px;
overflow: hidden;
}

.c0 input,
Expand Down Expand Up @@ -2670,8 +2676,8 @@ exports[`snapshots renders a single select input 1`] = `

.c0:focus-within {
border-color: #0969da;
outline: none;
box-shadow: inset 0 0 0 1px #0969da;
outline: 2px solid #0969da;
outline-offset: -1px;
}

.c0 > textarea {
Expand Down Expand Up @@ -3664,6 +3670,7 @@ exports[`snapshots renders with an input value 1`] = `
-ms-flex-align: stretch;
align-items: stretch;
min-height: 32px;
overflow: hidden;
}

.c0 input,
Expand Down Expand Up @@ -3693,8 +3700,8 @@ exports[`snapshots renders with an input value 1`] = `

.c0:focus-within {
border-color: #0969da;
outline: none;
box-shadow: inset 0 0 0 1px #0969da;
outline: 2px solid #0969da;
outline-offset: -1px;
}

.c0 > textarea {
Expand Down
Loading