Skip to content

Commit 3fd55a1

Browse files
committed
style: normalize CSS units to use em instead of px
1 parent f9a1625 commit 3fd55a1

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

assets/css/monei-blocks-checkout.css

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/* Card Input Container */
22
.monei-card-input {
3-
padding: 12px;
3+
padding: 0.75em;
44
transition: border-color 0.2s ease;
5-
margin-bottom: 12px;
5+
margin-bottom: 0.75em;
66
background-color: #fff;
7-
border: 1px solid hsla(0, 0%, 7%, .8);
8-
border-radius: 4px;
7+
border: 0.0625em solid hsla(0, 0%, 7%, .8);
8+
border-radius: 0.25em;
99
box-sizing: border-box;
1010
color: #2b2d2f;
1111
font-family: inherit;
@@ -20,7 +20,7 @@
2020

2121
.monei-card-input.is-focused {
2222
border-color: #007cba;
23-
box-shadow: 0 0 0 1px #007cba;
23+
box-shadow: 0 0 0 0.0625em #007cba;
2424
}
2525

2626
.monei-card-input.is-invalid {
@@ -30,8 +30,8 @@
3030
/* Cardholder Name Input */
3131
.monei-input {
3232
background-color: #fff;
33-
border: 1px solid hsla(0, 0%, 7%, .8);
34-
border-radius: 4px;
33+
border: 0.0625em solid hsla(0, 0%, 7%, .8);
34+
border-radius: 0.25em;
3535
box-sizing: border-box;
3636
color: #2b2d2f;
3737
font-family: inherit;
@@ -47,7 +47,7 @@
4747
.monei-input:focus {
4848
outline: none;
4949
border-color: #007cba;
50-
box-shadow: 0 0 0 1px #007cba;
50+
box-shadow: 0 0 0 0.0625em #007cba;
5151
}
5252

5353
.monei-input.has-error {
@@ -61,9 +61,7 @@
6161

6262
/* Payment Request Container */
6363
.monei-payment-request-container {
64-
min-height: 50px;
65-
display: flex;
66-
align-items: center;
64+
min-height: 3.125em;
6765
justify-content: center;
6866
background: #fff;
6967
width: 100%;
@@ -74,7 +72,7 @@
7472
.monei-label-container {
7573
display: flex;
7674
align-items: center;
77-
gap: 8px;
75+
gap: 0.5em;
7876
}
7977

8078
.monei-text {
@@ -84,12 +82,12 @@
8482
.monei-card-brands {
8583
display: inline-flex;
8684
align-items: center;
87-
gap: 5px;
85+
gap: 0.3125em;
8886
}
8987

9088
.monei-card-brands img,
9189
.card-brand-icon {
92-
height: 24px !important;
90+
height: 1.5em !important;
9391
width: auto !important;
9492
display: inline-block !important;
9593
margin: 0 !important;
@@ -101,7 +99,7 @@
10199
}
102100

103101
.monei-logo img {
104-
height: 24px;
102+
height: 1.5em;
105103
width: auto;
106104
}
107105

@@ -114,13 +112,13 @@
114112
}
115113

116114
.monei-card-fieldset {
117-
margin-top: 12px;
115+
margin-top: 0.75em;
118116
}
119117

120118
/* Loading State */
121119
.monei-loading {
122120
text-align: center;
123-
padding: 20px;
121+
padding: 1.25em;
124122
color: #666;
125123
}
126124

@@ -133,7 +131,7 @@
133131
/* Animation for smooth transitions */
134132
.monei-input-container {
135133
position: relative;
136-
margin-bottom: 16px;
134+
margin: 0 0 1em 0 !important;
137135
}
138136

139137

@@ -147,10 +145,10 @@
147145
@media (max-width: 480px) {
148146
.monei-input,
149147
.monei-card-input {
150-
font-size: 16px; /* Prevents zoom on iOS */
148+
font-size: 1em; /* Prevents zoom on iOS */
151149
}
152150

153151
.monei-payment-request-container {
154-
min-height: 60px;
152+
min-height: 3.75em;
155153
}
156154
}

0 commit comments

Comments
 (0)