Skip to content

Commit 5e42947

Browse files
committed
fix: ensure form entry styling is consistent across browsers and platforms
1 parent 671d464 commit 5e42947

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

src/pages/calendar/components/CalendarForm.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ function CalendarForm() {
203203
</div>
204204
</div>
205205

206-
<input type="number" id="puffer" name="puffer" value={puffer.toString()}
206+
<input type="number" id="puffer" name="puffer" value={puffer.toString()} min="0"
207207
onChange={onBufferChanged}/>
208208
</div>
209209

src/pages/calendar/components/calendar-form.less

+18-3
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@
1212
margin-bottom: 0.5em;
1313

1414
@media (max-width: @header-nav-breakpoint) {
15-
gap: 0.5em;
15+
gap: 0.8em;
1616
}
1717
}
1818
}
1919

2020
.form-entry {
21+
display: grid;
22+
gap: 4px;
23+
2124
label {
2225
color: @color-primary;
2326
font-weight: 600;
@@ -27,15 +30,27 @@
2730
border: 1px solid black;
2831
width: 100%;
2932
margin: 0;
30-
padding: 4px;
33+
padding: 4px 8px;
3134
box-sizing: border-box;
3235
font-family: "Source Sans Pro", sans-serif;
3336
font-size: 1rem;
3437
border-radius: 3px;
38+
background: transparent;
39+
text-align: left;
40+
color: #000;
41+
}
42+
43+
input::-webkit-date-and-time-value {
44+
text-align: left;
3545
}
3646

3747
select {
38-
padding: 4px 0;
48+
-webkit-appearance: none;
49+
appearance: none;
50+
// Font Awesome Chevron Down icon
51+
background-image: url('data:image/svg+xml;charset=utf8,<svg aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" width="20px" height="20px" viewBox="0 0 512 512" xml:space="preserve"><path fill="currentColor" d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"></path></svg>');
52+
background-position: center right 4px;
53+
background-repeat: no-repeat;
3954
}
4055

4156
.label-with-icon {

0 commit comments

Comments
 (0)