Skip to content

fix(composer): centre the column vertically - #205

Merged
PouyanJay merged 1 commit into
mainfrom
fix/composer-vertical-center
Aug 1, 2026
Merged

fix(composer): centre the column vertically#205
PouyanJay merged 1 commit into
mainfrom
fix/composer-vertical-center

Conversation

@PouyanJay

Copy link
Copy Markdown
Owner

The composer column centred horizontally but sat at the top of the page: align-items only handles the cross axis.

Why safe center and not center

In a scroll container, a plain justify-content: center clips the top of anything taller than the viewport and puts it permanently out of reach. With a long build history the heading itself would have been unscrollable.

safe center centres while the content fits and falls back to start alignment the moment it doesn't.

There is deliberately no plain center fallback declared above it. A browser without safe support drops the whole declaration and lands on start alignment, which is exactly today's behaviour; declaring center first would hand those browsers the clipping bug instead.

Padding is symmetric now, since asymmetric edges make a centred column read as sitting low.

1465 tests green · lint and build clean. CSS-only, so jsdom can't assert it; verified by build and by reasoning about the overflow case.

The column centred horizontally but sat at the top of the page, because
align-items only handles the cross axis.

`justify-content: safe center` rather than plain `center`, and the `safe`
is load-bearing. In a scroll container a plain `center` clips the top of
anything taller than the viewport and puts it permanently out of reach:
with a long build history the heading itself would have been
unscrollable. `safe` centres while the content fits and falls back to
start alignment the moment it does not.

There is deliberately no plain `center` declared above it as a fallback.
A browser without `safe` support drops the whole declaration and lands on
start alignment, which is exactly today's behaviour; declaring `center`
first would give those browsers the clipping bug instead.

Padding is symmetric now, since asymmetric edges make a centred column
read as sitting low.

1465 tests green. Lint and build clean.
@PouyanJay
PouyanJay merged commit d5010d6 into main Aug 1, 2026
6 checks passed
@PouyanJay
PouyanJay deleted the fix/composer-vertical-center branch August 1, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant