File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
site/src/components/InputGroup Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -5,17 +5,24 @@ export const InputGroup: FC<HTMLProps<HTMLDivElement>> = (props) => {
5
5
< div
6
6
{ ...props }
7
7
css = { {
8
- "&" : {
9
- display : "flex" ,
10
- alignItems : "flex-start" ,
8
+ display : "flex" ,
9
+ alignItems : "flex-start" ,
10
+
11
+ // Overlap borders to avoid displaying double borders between elements.
12
+ "& > *:not(:last-child)" : {
13
+ marginRight : - 1 ,
11
14
} ,
12
15
16
+ // Ensure the border of the hovered element is visible when borders
17
+ // overlap.
13
18
"& > *:hover" : {
14
19
zIndex : 1 ,
15
20
} ,
16
21
17
- "& > *:not(:last-child)" : {
18
- marginRight : - 1 ,
22
+ // Display border elements when focused or in an error state, both of
23
+ // which take priority over hover.
24
+ "& .Mui-focused, & .Mui-error" : {
25
+ zIndex : 2 ,
19
26
} ,
20
27
21
28
"& > *:first-child" : {
@@ -45,10 +52,6 @@ export const InputGroup: FC<HTMLProps<HTMLDivElement>> = (props) => {
45
52
borderRadius : 0 ,
46
53
} ,
47
54
} ,
48
-
49
- "& .Mui-focused, & .Mui-error" : {
50
- zIndex : 2 ,
51
- } ,
52
55
} }
53
56
/>
54
57
) ;
You can’t perform that action at this time.
0 commit comments