Skip to content

Commit dd285e2

Browse files
authored
Revert "Adjust focus styling of textarea and input" (#3998)
* Revert "Adjust focus styling of `textarea` and `input` (#3965)" This reverts commit c4216ef. * chore: add changeset --------- Co-authored-by: Josh Black <[email protected]>
1 parent 27d2c15 commit dd285e2

File tree

6 files changed

+137
-199
lines changed

6 files changed

+137
-199
lines changed

.changeset/chilly-spies-warn.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react': patch
3+
---
4+
5+
Remove changes to focus outline to prevent double focus rings from showing

src/__tests__/__snapshots__/Autocomplete.test.tsx.snap

+14-21
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ exports[`snapshots renders a custom empty state message 1`] = `
2121
-ms-flex-align: stretch;
2222
align-items: stretch;
2323
min-height: 32px;
24-
overflow: hidden;
2524
}
2625
2726
.c0 input,
@@ -51,8 +50,8 @@ exports[`snapshots renders a custom empty state message 1`] = `
5150
5251
.c0:focus-within {
5352
border-color: #0969da;
54-
outline: 2px solid #0969da;
55-
outline-offset: -1px;
53+
outline: none;
54+
box-shadow: inset 0 0 0 1px #0969da;
5655
}
5756
5857
.c0 > textarea {
@@ -188,7 +187,6 @@ exports[`snapshots renders a loading state 1`] = `
188187
-ms-flex-align: stretch;
189188
align-items: stretch;
190189
min-height: 32px;
191-
overflow: hidden;
192190
}
193191
194192
.c0 input,
@@ -218,8 +216,8 @@ exports[`snapshots renders a loading state 1`] = `
218216
219217
.c0:focus-within {
220218
border-color: #0969da;
221-
outline: 2px solid #0969da;
222-
outline-offset: -1px;
219+
outline: none;
220+
box-shadow: inset 0 0 0 1px #0969da;
223221
}
224222
225223
.c0 > textarea {
@@ -390,7 +388,6 @@ exports[`snapshots renders a menu that contains an item to add to the menu 1`] =
390388
-ms-flex-align: stretch;
391389
align-items: stretch;
392390
min-height: 32px;
393-
overflow: hidden;
394391
}
395392
396393
.c0 input,
@@ -420,8 +417,8 @@ exports[`snapshots renders a menu that contains an item to add to the menu 1`] =
420417
421418
.c0:focus-within {
422419
border-color: #0969da;
423-
outline: 2px solid #0969da;
424-
outline-offset: -1px;
420+
outline: none;
421+
box-shadow: inset 0 0 0 1px #0969da;
425422
}
426423
427424
.c0 > textarea {
@@ -1168,7 +1165,6 @@ exports[`snapshots renders a multiselect input 1`] = `
11681165
-ms-flex-align: stretch;
11691166
align-items: stretch;
11701167
min-height: 32px;
1171-
overflow: hidden;
11721168
}
11731169
11741170
.c0 input,
@@ -1198,8 +1194,8 @@ exports[`snapshots renders a multiselect input 1`] = `
11981194
11991195
.c0:focus-within {
12001196
border-color: #0969da;
1201-
outline: 2px solid #0969da;
1202-
outline-offset: -1px;
1197+
outline: none;
1198+
box-shadow: inset 0 0 0 1px #0969da;
12031199
}
12041200
12051201
.c0 > textarea {
@@ -1833,7 +1829,6 @@ exports[`snapshots renders a multiselect input with selected menu items 1`] = `
18331829
-ms-flex-align: stretch;
18341830
align-items: stretch;
18351831
min-height: 32px;
1836-
overflow: hidden;
18371832
}
18381833
18391834
.c0 input,
@@ -1863,8 +1858,8 @@ exports[`snapshots renders a multiselect input with selected menu items 1`] = `
18631858
18641859
.c0:focus-within {
18651860
border-color: #0969da;
1866-
outline: 2px solid #0969da;
1867-
outline-offset: -1px;
1861+
outline: none;
1862+
box-shadow: inset 0 0 0 1px #0969da;
18681863
}
18691864
18701865
.c0 > textarea {
@@ -2646,7 +2641,6 @@ exports[`snapshots renders a single select input 1`] = `
26462641
-ms-flex-align: stretch;
26472642
align-items: stretch;
26482643
min-height: 32px;
2649-
overflow: hidden;
26502644
}
26512645
26522646
.c0 input,
@@ -2676,8 +2670,8 @@ exports[`snapshots renders a single select input 1`] = `
26762670
26772671
.c0:focus-within {
26782672
border-color: #0969da;
2679-
outline: 2px solid #0969da;
2680-
outline-offset: -1px;
2673+
outline: none;
2674+
box-shadow: inset 0 0 0 1px #0969da;
26812675
}
26822676
26832677
.c0 > textarea {
@@ -3670,7 +3664,6 @@ exports[`snapshots renders with an input value 1`] = `
36703664
-ms-flex-align: stretch;
36713665
align-items: stretch;
36723666
min-height: 32px;
3673-
overflow: hidden;
36743667
}
36753668
36763669
.c0 input,
@@ -3700,8 +3693,8 @@ exports[`snapshots renders with an input value 1`] = `
37003693
37013694
.c0:focus-within {
37023695
border-color: #0969da;
3703-
outline: 2px solid #0969da;
3704-
outline-offset: -1px;
3696+
outline: none;
3697+
box-shadow: inset 0 0 0 1px #0969da;
37053698
}
37063699
37073700
.c0 > textarea {

0 commit comments

Comments
 (0)