@@ -11,12 +11,13 @@ export default createStyleSheet('InputDefault', theme => {
11
11
const bottomBorderSize = 3 ;
12
12
13
13
const modifierFn = color => ( {
14
+ marginBottom : inputMarginBottom ,
15
+
14
16
'& .input__label' : {
15
17
color,
16
18
} ,
17
19
18
20
'& .input__field' : {
19
- marginBottom : 0 ,
20
21
borderBottom : `${ bottomBorderSize } px solid ${ color } ` ,
21
22
} ,
22
23
@@ -27,7 +28,6 @@ export default createStyleSheet('InputDefault', theme => {
27
28
} ,
28
29
29
30
'&__field' : {
30
- marginBottom : 0 ,
31
31
borderBottom : `${ bottomBorderSize } px solid ${ disabledColor ( color ) } ` ,
32
32
} ,
33
33
} ,
@@ -41,7 +41,6 @@ export default createStyleSheet('InputDefault', theme => {
41
41
} ,
42
42
43
43
'&__field' : {
44
- marginBottom : 0 ,
45
44
borderColor : color ,
46
45
borderBottom : `${ bottomBorderSize } px solid ${ color } ` ,
47
46
} ,
@@ -54,7 +53,7 @@ export default createStyleSheet('InputDefault', theme => {
54
53
fontSize : 14 ,
55
54
fontFamily : typography . primary . fontFamily ,
56
55
color : palette . text . default ,
57
- marginBottom : inputMarginBottom ,
56
+ marginBottom : inputMarginBottom + bottomBorderSize - borderSize ,
58
57
position : 'relative' ,
59
58
60
59
'&.input--has-success' : modifierFn ( palette . variant . success ) ,
@@ -71,6 +70,7 @@ export default createStyleSheet('InputDefault', theme => {
71
70
} ,
72
71
73
72
'&.input--has-focus' : {
73
+ marginBottom : inputMarginBottom ,
74
74
'& .input' : {
75
75
'&__label' : {
76
76
color : palette . action . active ,
@@ -79,7 +79,6 @@ export default createStyleSheet('InputDefault', theme => {
79
79
} ,
80
80
81
81
'&__field' : {
82
- marginBottom : 0 ,
83
82
borderColor : palette . action . active ,
84
83
borderBottom : `3px solid ${ palette . action . active } ` ,
85
84
} ,
@@ -145,7 +144,6 @@ export default createStyleSheet('InputDefault', theme => {
145
144
padding : 8 ,
146
145
paddingTop : 10 ,
147
146
transition : transitions . create ( [ 'border-color' ] ) ,
148
- marginBottom : inputMarginBottom + bottomBorderSize - borderSize ,
149
147
} ,
150
148
151
149
'& .input__label' : {
0 commit comments