Skip to content

Commit c4216ef

Browse files
authored
Adjust focus styling of textarea and input (#3965)
* Adjust focus styling * Update tests
1 parent 87028d2 commit c4216ef

File tree

5 files changed

+199
-132
lines changed

5 files changed

+199
-132
lines changed

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

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ 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;
2425
}
2526
2627
.c0 input,
@@ -50,8 +51,8 @@ exports[`snapshots renders a custom empty state message 1`] = `
5051
5152
.c0:focus-within {
5253
border-color: #0969da;
53-
outline: none;
54-
box-shadow: inset 0 0 0 1px #0969da;
54+
outline: 2px solid #0969da;
55+
outline-offset: -1px;
5556
}
5657
5758
.c0 > textarea {
@@ -187,6 +188,7 @@ exports[`snapshots renders a loading state 1`] = `
187188
-ms-flex-align: stretch;
188189
align-items: stretch;
189190
min-height: 32px;
191+
overflow: hidden;
190192
}
191193
192194
.c0 input,
@@ -216,8 +218,8 @@ exports[`snapshots renders a loading state 1`] = `
216218
217219
.c0:focus-within {
218220
border-color: #0969da;
219-
outline: none;
220-
box-shadow: inset 0 0 0 1px #0969da;
221+
outline: 2px solid #0969da;
222+
outline-offset: -1px;
221223
}
222224
223225
.c0 > textarea {
@@ -388,6 +390,7 @@ exports[`snapshots renders a menu that contains an item to add to the menu 1`] =
388390
-ms-flex-align: stretch;
389391
align-items: stretch;
390392
min-height: 32px;
393+
overflow: hidden;
391394
}
392395
393396
.c0 input,
@@ -417,8 +420,8 @@ exports[`snapshots renders a menu that contains an item to add to the menu 1`] =
417420
418421
.c0:focus-within {
419422
border-color: #0969da;
420-
outline: none;
421-
box-shadow: inset 0 0 0 1px #0969da;
423+
outline: 2px solid #0969da;
424+
outline-offset: -1px;
422425
}
423426
424427
.c0 > textarea {
@@ -1165,6 +1168,7 @@ exports[`snapshots renders a multiselect input 1`] = `
11651168
-ms-flex-align: stretch;
11661169
align-items: stretch;
11671170
min-height: 32px;
1171+
overflow: hidden;
11681172
}
11691173
11701174
.c0 input,
@@ -1194,8 +1198,8 @@ exports[`snapshots renders a multiselect input 1`] = `
11941198
11951199
.c0:focus-within {
11961200
border-color: #0969da;
1197-
outline: none;
1198-
box-shadow: inset 0 0 0 1px #0969da;
1201+
outline: 2px solid #0969da;
1202+
outline-offset: -1px;
11991203
}
12001204
12011205
.c0 > textarea {
@@ -1829,6 +1833,7 @@ exports[`snapshots renders a multiselect input with selected menu items 1`] = `
18291833
-ms-flex-align: stretch;
18301834
align-items: stretch;
18311835
min-height: 32px;
1836+
overflow: hidden;
18321837
}
18331838
18341839
.c0 input,
@@ -1858,8 +1863,8 @@ exports[`snapshots renders a multiselect input with selected menu items 1`] = `
18581863
18591864
.c0:focus-within {
18601865
border-color: #0969da;
1861-
outline: none;
1862-
box-shadow: inset 0 0 0 1px #0969da;
1866+
outline: 2px solid #0969da;
1867+
outline-offset: -1px;
18631868
}
18641869
18651870
.c0 > textarea {
@@ -2641,6 +2646,7 @@ exports[`snapshots renders a single select input 1`] = `
26412646
-ms-flex-align: stretch;
26422647
align-items: stretch;
26432648
min-height: 32px;
2649+
overflow: hidden;
26442650
}
26452651
26462652
.c0 input,
@@ -2670,8 +2676,8 @@ exports[`snapshots renders a single select input 1`] = `
26702676
26712677
.c0:focus-within {
26722678
border-color: #0969da;
2673-
outline: none;
2674-
box-shadow: inset 0 0 0 1px #0969da;
2679+
outline: 2px solid #0969da;
2680+
outline-offset: -1px;
26752681
}
26762682
26772683
.c0 > textarea {
@@ -3664,6 +3670,7 @@ exports[`snapshots renders with an input value 1`] = `
36643670
-ms-flex-align: stretch;
36653671
align-items: stretch;
36663672
min-height: 32px;
3673+
overflow: hidden;
36673674
}
36683675
36693676
.c0 input,
@@ -3693,8 +3700,8 @@ exports[`snapshots renders with an input value 1`] = `
36933700
36943701
.c0:focus-within {
36953702
border-color: #0969da;
3696-
outline: none;
3697-
box-shadow: inset 0 0 0 1px #0969da;
3703+
outline: 2px solid #0969da;
3704+
outline-offset: -1px;
36983705
}
36993706
37003707
.c0 > textarea {

0 commit comments

Comments
 (0)