Skip to content

Commit 762318b

Browse files
Adjust QR preview layout for mobile and desktop (#8)
On mobile, the QR code preview will now be shown first and then the form to edit the QR code details.
1 parent fd7c95a commit 762318b

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

qr.html

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,17 @@
3434
}
3535

3636
.layout {
37-
display: grid;
37+
display: flex;
38+
flex-direction: column;
3839
gap: clamp(1.5rem, 3vw, 2.5rem);
39-
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
4040
}
4141

4242
form {
4343
display: flex;
4444
flex-direction: column;
4545
gap: clamp(1rem, 2.5vw, 1.5rem);
4646
padding: clamp(1.1rem, 2vw, 1.75rem);
47+
order: 2;
4748
}
4849

4950
.form-section {
@@ -94,6 +95,7 @@
9495
gap: 1rem;
9596
align-items: center;
9697
padding: clamp(1.1rem, 2vw, 1.75rem);
98+
order: 1;
9799
}
98100

99101
.preview-wrapper {
@@ -157,6 +159,23 @@
157159
grid-template-columns: 1fr 1fr;
158160
}
159161
}
162+
163+
@media (min-width: 920px) {
164+
.layout {
165+
flex-direction: row;
166+
align-items: flex-start;
167+
}
168+
169+
form {
170+
order: 1;
171+
flex: 1;
172+
}
173+
174+
.preview-card {
175+
order: 2;
176+
flex: 0 0 auto;
177+
}
178+
}
160179
</style>
161180
</head>
162181

0 commit comments

Comments
 (0)