fabrica

hanna/fabrica

fix(web): stop card-form submit margin from misaligning inline buttons

46dfc15 · hanna committed on 2026-07-25

The .card form submit margin-top (for Save buttons) out-specified the
inline-row overrides and pushed the collaborator Add and avatar Upload
buttons down out of line with their inputs. Exclude buttons tagged
.inline-btn from that rule so they align on the shared control height.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed by hannaSSH key fingerprint: SHA256:4g9cWhkAAw8gwqhJUcVbSnGEvdGwklW+1Aa/fMUu59k
3 files changed · +6 −7UnifiedSplit
assets/base.css +4 −5
@@ -306,8 +306,6 @@ body.drawer-open .drawer-backdrop {
306}306}
307.collab-add button {307.collab-add button {
308 flex: none;308 flex: none;
309 /* Override the card-form submit spacing so it aligns in the row. */
310 margin-top: 0;
311}309}
312310
313label {311label {
@@ -337,8 +335,10 @@ select:focus {
337 outline: none;335 outline: none;
338}336}
339337
340/* Submit buttons in a card form get breathing room from the last field. */338/* Submit buttons in a card form get breathing room from the last field —
341.card form button[type="submit"] {339 except buttons that sit inline in a control row (they must not be nudged
340 down out of alignment with their input). */
341.card form button[type="submit"]:not(.inline-btn) {
342 margin-top: 1.1rem;342 margin-top: 1.1rem;
343}343}
344.field-hint {344.field-hint {
@@ -789,7 +789,6 @@ select:focus {
789 color: var(--fb-fg);789 color: var(--fb-fg);
790}790}
791.avatar-upload-row button[type="submit"] {791.avatar-upload-row button[type="submit"] {
792 margin-top: 0;
793 flex: none;792 flex: none;
794}793}
795794
crates/web/src/pages.rs +1 −1
@@ -613,7 +613,7 @@ fn settings_body(user: &User, csrf: &str, notice: Option<&str>) -> Markup {
613 p class="muted field-hint" { "PNG, JPEG, GIF, or WebP up to 1 MiB. Leave blank for a generated identicon." }613 p class="muted field-hint" { "PNG, JPEG, GIF, or WebP up to 1 MiB. Leave blank for a generated identicon." }
614 div class="avatar-upload-row" {614 div class="avatar-upload-row" {
615 input type="file" name="avatar" accept="image/png,image/jpeg,image/gif,image/webp";615 input type="file" name="avatar" accept="image/png,image/jpeg,image/gif,image/webp";
616 button class="btn" type="submit" { (icon(Icon::Upload)) span { "Upload" } }616 button class="btn inline-btn" type="submit" { (icon(Icon::Upload)) span { "Upload" } }
617 }617 }
618 }618 }
619 }619 }
crates/web/src/repo.rs +1 −1
@@ -790,7 +790,7 @@ async fn repo_settings_view(
790 (perm_option("write", "Write"))790 (perm_option("write", "Write"))
791 (perm_option("admin", "Admin"))791 (perm_option("admin", "Admin"))
792 }792 }
793 button class="btn btn-primary" type="submit" { "Add" }793 button class="btn btn-primary inline-btn" type="submit" { "Add" }
794 }794 }
795 }795 }
796 }796 }