Skip to content

Commit 71bb628

Browse files
committed
fix: side-by-side field alignment — use flex chain instead of height:100%
Make .field-wrapper columns display:flex so .mb-3 can use flex:1 instead of height:100% (which doesn't resolve reliably in stretched flex items). This creates a proper flex chain: row → column (stretches to tallest) → .mb-3 (fills via flex:1) → input (margin-top:auto). Bump version to 0.63.3.
1 parent 1330eef commit 71bb628

File tree

3 files changed

+31
-10
lines changed

3 files changed

+31
-10
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.63.3] - 2026-04-02
11+
12+
### Fixed
13+
- **Side-by-side field alignment (take 2)** — inputs in paired half-width
14+
rows now align correctly even when one label wraps to multiple lines.
15+
Made each column a flex container (`display: flex; flex-direction: column`)
16+
and `.mb-3` uses `flex: 1` instead of `height: 100%`, creating a proper
17+
flex chain that reliably pushes inputs to a consistent vertical position.
18+
1019
## [0.63.2] - 2026-04-02
1120

1221
### Fixed

django_forms_workflows/static/django_forms_workflows/css/forms.css

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,45 @@
33
═══════════════════════════════════════════════════════════════════════════ */
44

55
/* ── Side-by-side field alignment ────────────────────────────────────────
6-
When two or more fields sit in a .row.fields-aligned-row, columns
7-
stretch to equal height (the default flex behaviour). Each .mb-3
8-
wrapper becomes a flex column so the label area grows evenly and
9-
the input sits at a consistent vertical position regardless of
10-
label length, help-text presence, or wrapped text. */
6+
When two or more fields sit in a .row.fields-aligned-row, every column
7+
becomes a flex column so .mb-3 can stretch to fill it. The input/select
8+
uses margin-top:auto to push itself to the bottom of the label area,
9+
keeping inputs horizontally aligned regardless of label wrapping. */
10+
11+
/* 1. Make each column a flex column so .mb-3 can stretch */
12+
.row.fields-aligned-row > [class*="col-"],
13+
.row.fields-aligned-row > .field-wrapper {
14+
display: flex;
15+
flex-direction: column;
16+
}
1117

18+
/* 2. .mb-3 fills the column and is itself a flex column */
1219
.row.fields-aligned-row > [class*="col-"] > .mb-3,
1320
.row.fields-aligned-row > .field-wrapper > .mb-3 {
1421
display: flex;
1522
flex-direction: column;
16-
height: 100%;
23+
flex: 1 1 auto;
1724
}
25+
26+
/* 3. Labels stay at their natural size */
1827
.row.fields-aligned-row > [class*="col-"] > .mb-3 > label,
1928
.row.fields-aligned-row > .field-wrapper > .mb-3 > label {
2029
flex-shrink: 0;
2130
}
31+
32+
/* 4. Push the input/select to the bottom of the label area */
2233
.row.fields-aligned-row > [class*="col-"] > .mb-3 > .form-control,
2334
.row.fields-aligned-row > [class*="col-"] > .mb-3 > .form-select,
2435
.row.fields-aligned-row > .field-wrapper > .mb-3 > .form-control,
2536
.row.fields-aligned-row > .field-wrapper > .mb-3 > .form-select {
26-
margin-top: auto; /* push the input to the bottom of the cell */
37+
margin-top: auto;
2738
}
28-
/* Help text sits *after* the input and shouldn't shift it up */
39+
40+
/* 5. Help text sits after the input — reserve consistent space */
2941
.row.fields-aligned-row > [class*="col-"] > .mb-3 > .form-text,
3042
.row.fields-aligned-row > .field-wrapper > .mb-3 > .form-text {
3143
flex-shrink: 0;
32-
min-height: 1.4em; /* reserve space even when empty for alignment */
44+
min-height: 1.4em;
3345
}
3446

3547
/* ── Consistent field spacing ────────────────────────────────────────── */

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "django-forms-workflows"
3-
version = "0.63.2"
3+
version = "0.63.3"
44
description = "Enterprise-grade, database-driven form builder with approval workflows and external data integration"
55
license = "LGPL-3.0-only"
66
readme = "README.md"

0 commit comments

Comments
 (0)