Skip to content

Commit 339da0d

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 003b494 commit 339da0d

File tree

6 files changed

+31
-24
lines changed

6 files changed

+31
-24
lines changed

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

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

5757
.select :global(.react-select__control) {
5858
background-color: var(--background-secondary);
59-
border-radius: 2px;
59+
border-radius: 0.2rem;
60+
border-width: var(--border-width);
61+
min-height: var(--input-height);
6062
padding: var(--space-quarter) var(--space-eight);
6163
}
6264

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

Lines changed: 7 additions & 7 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: var(--border-width) solid var(--background-tertiary);
3131
border-radius: 2px;
3232
top: 2px;
3333
}
@@ -37,22 +37,22 @@
3737
}
3838
.warning input + label::before {
3939
border-color: var(--background-secondary);
40-
outline: 1px solid var(--color-warning);
40+
outline: var(--border-width) 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: var(--border-width) solid var(--color-info);
4545
}
4646

4747
.checkbox input + label::after {
4848
background: transparent;
4949
border: solid var(--background-secondary);
50-
border-width: 0px 2px 2px 0;
50+
border-width: 0 2px 2px 0;
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: var(--border-width);
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: 9 additions & 9 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));
30-
right: calc(var(--spacing-default) - var(--space-quarter));
31-
cursor: pointer;
30+
right: 0.75rem;
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: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@
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-radius: 2px;
62+
border-width: var(--border-width);
63+
margin-bottom: var(--space-quarter);
64+
min-height: var(--input-height);
6265
padding-bottom: 0;
6366
padding-top: 0;
6467
z-index: 1;
65-
margin-bottom: var(--space-quarter);
6668
}
6769

6870
@media (min-width: 640px) {
@@ -113,13 +115,15 @@
113115

114116
.rowCustomFee .priority :global(.react-select__control:not(:hover)) {
115117
border-right-color: var(--background-secondary);
118+
border-width: var(--border-width);
116119
}
117120

118121
.customFeeUnit {
119-
bottom: 0;
122+
bottom: var(--space-quarter);
120123
color: var(--color-secondary);
121-
font-size: var(--size-default);
122-
line-height: 50px;
124+
font-size: min(var(--size-default), 20px);
125+
line-height: 1;
126+
height: calc(var(--input-height) * 0.5);
123127
padding-right: var(--space-half);
124128
position: absolute;
125129
right: 0;

frontends/web/src/style/variables.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
/* form elements */
107107
--border-width: 0.1rem;
108108
--button-height: min(5rem, 70px);
109+
--input-height: min(5.2rem, 72px);
109110
}
110111

111112
:root,

0 commit comments

Comments
 (0)