Repository navigation
fix(auth): space the sign-in and register buttons apart - #179
Conversation
codehubbers#152 dropped the me-3 margin on the sign-in button, so the two buttons touched. Lay them out with flex and a 16px gap instead of space-y-4, which only spaced them vertically. They still wrap and stack on narrow screens. Picked by the community poll in #design-ui (option A, 3 of 4 votes).
Ziqian-Huang0607
left a comment
There was a problem hiding this comment.
Verified against the markup: both buttons are w-80 inside a single wrapper, and space-y-4 only separates children vertically, so whenever the buttons sit side by side there is no gap between them. flex flex-wrap justify-center gap-4 gives a 16px gap on both axes and stacks them cleanly on narrow screens, which matches the option that won the design poll.
Checked the diff applies cleanly on current main, CI is green, and the change is one class on one element, so no side effects elsewhere. Approve.
Ziqian-Huang0607
left a comment
There was a problem hiding this comment.
Independently re-checked the markup, and the diagnosis holds. The two buttons are inline-block with w-80, so when they sit side by side the old space-y-4 did literally nothing for them (it only adds vertical margin between children), which is why removing me-3 in #152 made them touch. flex flex-wrap justify-center gap-4 fixes both axes at once: 16px between them on desktop, 16px between the stacked rows on mobile, and no change to any other element since the wrapper only holds these two buttons. Matches the option that won the poll.
One pre-existing nit, not for this PR: w-80 is a fixed 320px, so on viewports under roughly 368px the buttons overflow the padded container. If that matters, a w-full max-w-xs pattern fixes it in the same breath. Happy to open a tiny follow-up if you want it.
Either way this change is correct as-is.
The sign-in and register buttons on
/authwere touching. #152 dropped theme-3margin on the sign-in button, and the wrapper only hadspace-y-4, which adds vertical space and none between buttons sitting side by side. MXD-K1 reported it in #design-ui.We ran a poll there with three options, and A won with 3 of 4 votes: keep the buttons side by side with a 16px gap. This PR changes the wrapper to
flex flex-wrap justify-center gap-4.Checked locally
prettier --check,eslintand the full Jest run all pass (416/416).