Skip to content

Commit 88b3d54

Browse files
committed
style(input): change input textarea margins
change input textarea and margins to match material design specs change input and textarea selectors to be more uniform
1 parent 7b4254d commit 88b3d54

File tree

3 files changed

+34
-52
lines changed

3 files changed

+34
-52
lines changed

src/input-info/ux-input-info-theme.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
ux-input-info {
22
display: flex;
3-
margin-top: 4px;
43
font-size: 14px;
54
width: 100%;
65
color: ${hintText || $design.primaryLightForeground};

src/input/ux-input-theme.css

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,38 @@ ux-input {
33
width: 100%;
44
}
55

6-
styles.input {
7-
display: block;
8-
position: relative;
9-
width: 100%;
10-
padding: 8px;
11-
border: 0;
12-
outline: none;
13-
}
14-
15-
ux-input > styles.input {
6+
styles.input {
7+
width: 100%;
8+
padding: 16px 0 8px 0;
9+
margin-bottom: 8px;
10+
border: 0;
11+
outline: none;
1612
padding-left:0;
1713
padding-right:0;
1814
transition: 250ms;
1915
background-color: ${background};
2016
border-bottom: 2px solid ${foreground || $design.primaryLightForeground};
2117
}
2218

23-
ux-input > styles.input:hover {
19+
styles.input:hover,
20+
styles.input:focus {
2421
border-bottom-color: ${$design.accent};
2522
}
2623

27-
ux-input > styles.input:focus {
28-
border-bottom-color: ${$design.accentDark};
29-
}
30-
31-
ux-input > styles.input[disabled],
32-
ux-input > styles.input[disabled]:hover,
33-
ux-input > styles.input[disabled]:focus,
34-
ux-input > styles.input[readonly],
35-
ux-input > styles.input[readonly]:hover,
36-
ux-input > styles.input[readonly]:focus {
24+
styles.input[disabled],
25+
styles.input[disabled]:hover,
26+
styles.input[disabled]:focus,
27+
styles.input[readonly],
28+
styles.input[readonly]:hover,
29+
styles.input[readonly]:focus {
3730
color: ${foregroundDisabled || $swatches.grey.p500};
3831
border-bottom: 1px dashed ${foregroundDisabled || $swatches.grey.p300};
3932
}
4033

4134
ux-input.full-width > styles.input {
42-
padding: 20px;
43-
padding-left: 8px;
44-
padding-right: 8px;
35+
padding: 20px 8px;
4536
font-size: 16px;
37+
margin-bottom: 0;
4638
border: 1px solid ${$swatches.grey.p200};
4739
background-color: ${$swatches.white};
4840
}

src/textarea/ux-textarea-theme.css

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,32 @@ ux-textarea {
22
display: block;
33
width: 100%;
44
}
5-
6-
styles.textarea {
7-
display: block;
8-
position: relative;
9-
width: 100%;
10-
height: 100%;
11-
padding: 8px;
12-
border: 0;
13-
outline: none;
14-
resize: none;
15-
}
16-
17-
ux-textarea > styles.textarea {
5+
styles.textarea {
6+
width: 100%;
7+
height: 100%;
8+
padding: 16px 0 8px 0;
9+
margin-bottom: 8px;
10+
border: 0;
11+
outline: none;
12+
resize: none;
1813
padding-left:0;
1914
padding-right:0;
2015
transition: 250ms;
2116
background-color: ${background};
2217
border-bottom: 2px solid ${foreground || $design.primaryLightForeground};
2318
}
2419

25-
ux-textarea > styles.textarea:hover {
20+
styles.textarea:hover,
21+
styles.textarea:focus {
2622
border-bottom-color: ${$design.accent};
2723
}
2824

29-
ux-textarea > styles.textarea:focus {
30-
border-bottom-color: ${$design.accentDark};
31-
}
32-
33-
ux-textarea > styles.textarea[disabled],
34-
ux-textarea > styles.textarea[disabled]:hover,
35-
ux-textarea > styles.textarea[disabled]:focus,
36-
ux-textarea > styles.textarea[readonly],
37-
ux-textarea > styles.textarea[readonly]:hover,
38-
ux-textarea > styles.textarea[readonly]:focus {
25+
styles.textarea[disabled],
26+
styles.textarea[disabled]:hover,
27+
styles.textarea[disabled]:focus,
28+
styles.textarea[readonly],
29+
styles.textarea[readonly]:hover,
30+
styles.textarea[readonly]:focus {
3931
color: ${foregroundDisabled || $swatches.grey.p500};
4032
border-bottom: 1px dashed ${foregroundDisabled || $swatches.grey.p300};
4133
}
@@ -45,9 +37,8 @@ styles.textarea {
4537
}
4638

4739
ux-textarea.full-width > styles.textarea {
48-
padding: 20px;
49-
padding-left: 8px;
50-
padding-right: 8px;
40+
padding: 20px 8px;
41+
margin-bottom: 0;
5142
font-size: 16px;
5243
border: 1px solid ${$swatches.grey.p200};
5344
background-color: ${$swatches.white};

0 commit comments

Comments
 (0)