Skip to content

Commit daed674

Browse files
committed
frontend: improve form elements in responsive mode
Improved various form elements mostly related to Send view. Can be tested by setting font-size: 150%; on the html element.
1 parent bfa8b4c commit daed674

File tree

6 files changed

+27
-23
lines changed

6 files changed

+27
-23
lines changed

frontends/web/src/components/dropdown/dropdown.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
.select :global(.react-select__control) {
5858
background-color: var(--background-secondary);
59-
border-radius: 2px;
59+
border-radius: 0.2rem;
6060
padding: var(--space-quarter) var(--space-eight);
6161
}
6262

frontends/web/src/components/forms/checkbox.module.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
.checkbox input + label {
88
display: inline-block;
99
max-width: 100%;
10-
padding-left: 2em;
10+
padding-left: 2rem;
1111
position: relative;
1212
}
1313

@@ -27,7 +27,7 @@
2727
}
2828

2929
.checkbox input + label::before {
30-
border: 1px solid var(--background-tertiary);
30+
border: 0.1rem solid var(--background-tertiary);
3131
border-radius: 2px;
3232
top: 2px;
3333
}
@@ -37,11 +37,11 @@
3737
}
3838
.warning input + label::before {
3939
border-color: var(--background-secondary);
40-
outline: 1px solid var(--color-warning);
40+
outline: 0.1rem solid var(--color-warning);
4141
}
4242
.info input + label::before {
4343
border-color: var(--background-secondary);
44-
outline: 1px solid var(--color-info);
44+
outline: 0.1rem solid var(--color-info);
4545
}
4646

4747
.checkbox input + label::after {
@@ -51,8 +51,8 @@
5151
width: 0.35em;
5252
height: 0.55em;
5353
position: absolute;
54-
top: 6px;
55-
left: 6px;
54+
top: min(0.6rem, 9px);
55+
left: 0.6rem;
5656
margin-left: -1px;
5757
margin-top: -2px;
5858
opacity: 0;

frontends/web/src/components/forms/input.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
border-color: var(--background-quaternary);
2929
border-radius: 2px;
3030
border-style: solid;
31-
border-width: 1px;
31+
border-width: 0.1rem;
3232
font-family: var(--font-family);
3333
font-size: var(--size-default);
3434
font-weight: 400;
35-
height: 52px;
35+
height: var(--input-height);
3636
padding: 0 var(--space-half);
3737
width: 100%;
3838
transition: border-color .2s ease-out;

frontends/web/src/routes/account/send/components/inputs/receiver-address-input.module.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@
1818

1919
.qrButton {
2020
align-items: center;
21-
display: flex;
21+
background-color: transparent;
22+
bottom: 0;
2223
border: none;
23-
background-color: var(--background-secondary);
24-
height: 36px;
25-
width: 36px;
24+
cursor: pointer;
25+
display: flex;
26+
height: var(--input-height);
2627
justify-content: center;
2728
padding: 0;
2829
position: absolute;
29-
top: calc(50% - var(--space-quarter));
3030
right: calc(var(--spacing-default) - var(--space-quarter));
31-
cursor: pointer;
31+
width: 36px;
3232
}
3333

3434
.qrButton img {
35-
width: 18px;
36-
height: 18px;
35+
width: 1.8rem;
36+
height: 1.8rem;
3737
}

frontends/web/src/routes/account/send/feetargets.module.css

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,12 @@
5858
/* styles to overwrite default dropdown styling to make it fit into send */
5959
.priority :global(.react-select__control) {
6060
border-color: var(--background-quaternary);
61-
height: 52px;
61+
border-width: 0.1rem;
62+
margin-bottom: var(--space-quarter);
63+
min-height: var(--input-height);
6264
padding-bottom: 0;
6365
padding-top: 0;
6466
z-index: 1;
65-
margin-bottom: var(--space-quarter);
6667
}
6768

6869
@media (min-width: 640px) {
@@ -113,13 +114,15 @@
113114

114115
.rowCustomFee .priority :global(.react-select__control:not(:hover)) {
115116
border-right-color: var(--background-secondary);
117+
border-width: 0.2rem;
116118
}
117119

118120
.customFeeUnit {
119-
bottom: 0;
121+
bottom: var(--space-quarter);
120122
color: var(--color-secondary);
121-
font-size: var(--size-default);
122-
line-height: 50px;
123+
font-size: min(var(--size-default), 20px);
124+
line-height: 1;
125+
height: calc(var(--input-height) * 0.5);
123126
padding-right: var(--space-half);
124127
position: absolute;
125128
right: 0;

frontends/web/src/style/variables.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@
107107
/* bottom navigation */
108108
--bottom-navigation-height: calc(min(7rem, 90px) + env(safe-area-inset-bottom, 0));
109109

110-
/* buttons */
110+
/* form elements */
111111
--button-height: min(5rem, 70px);
112+
--input-height: min(5.2rem, 72px);
112113
}
113114

114115
:root,

0 commit comments

Comments
 (0)