fix(admin-x-settings): Fix portal links input border rendering in Tailwind v4#26835
fix(admin-x-settings): Fix portal links input border rendering in Tailwind v4#26835jonhickman wants to merge 1 commit intoTryGhost:mainfrom
Conversation
WalkthroughThe change modifies a styling class on a TextField component in the PortalLinks.tsx file. Specifically, the border styling class is updated from "border-b-500" to "border-b-grey-500". This is a CSS class modification only, with no alterations to the component's functional logic, event handlers, data binding, or overall structure. The PortalLink component and surrounding code remain functionally identical. 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| <div className='flex w-full grow flex-col py-3 lg:flex-row lg:items-center lg:gap-5'> | ||
| <label className='inline-block whitespace-nowrap lg:w-[180px] lg:min-w-[180px]' htmlFor={id}>{name}:</label> | ||
| <TextField className='border-b-500 grow bg-transparent py-1 text-grey-700 lg:p-1' id={id} value={value} disabled unstyled /> | ||
| <TextField className='border-b-grey-500 grow bg-transparent py-1 text-grey-700 lg:p-1' id={id} value={value} disabled unstyled /> |
There was a problem hiding this comment.
Missing border width makes bottom border invisible
Medium Severity
The class border-b-grey-500 only sets border-bottom-color but doesn't set a border-bottom-width. The project's preflight CSS resets all elements to border-width: 0, so the border remains invisible. Every other bottom-border usage in the codebase pairs a width class with a color class — e.g. border-b border-grey-200 in ListItem.tsx, Table.tsx, and SortableList.tsx. This needs something like border-b alongside border-b-grey-500 to actually render a visible border.


Problem
In
PortalLinks.tsx, theTextFieldcomponent uses the classborder-b-500. In Tailwind v4, this is parsed asborder-bottom-width: 500px(a width utility) rather than a border color, because there is no color segment in the class name. This causes a massive ~500px grey rectangle to render below each link input field on the Portal Links settings page.Fix
Changed
border-b-500→border-b-grey-500so that Tailwind v4 correctly resolves it as a border color using Ghost's grey color palette. This is consistent with the existingtext-grey-700class on the same element, confirming Ghost uses "grey" (not "gray") throughout its color tokens.File changed:
apps/admin-x-settings/src/components/settings/membership/portal/PortalLinks.tsxReproduction steps
/ghost/#/settings/portal/editborder-bottom-width: 500px)After fix
Each link input renders with a standard bottom border using the
grey-500color token, matching the intended design.Note
Low Risk
Low risk UI-only change: adjusts a Tailwind class on a disabled
TextFieldto prevent incorrectborder-bottom-widthrendering in Tailwind v4.Overview
Fixes Portal Links input styling by changing the
TextFieldbottom-border utility fromborder-b-500toborder-b-grey-500, ensuring Tailwind v4 treats it as a color token rather than a 500px border width.Written by Cursor Bugbot for commit 0a447e3. This will update automatically on new commits. Configure here.