Repository navigation
Conversation
| 'n-checkbox': 'inline-flex gap-1 items-center rounded', | ||
| 'n-checkbox-hover': 'op100 n-bg-hover cursor-pointer', | ||
| 'n-checkbox-box': 'border n-border-base w-1.1em h-1.1em mr-1 text-white flex flex-none items-center rounded-sm overflow-visible', | ||
| 'n-checkbox-box': 'border n-border-base w-1.1em h-1.1em mr-1 ml-2 text-white flex flex-none items-center rounded-sm overflow-visible', |
There was a problem hiding this comment.
Why it's 2? Maybe we should fix on the usage side?
There was a problem hiding this comment.
gap is 1 and margin-right is 1, so margin-left in 2
sorry, let i think of other idea
There was a problem hiding this comment.
mabye i think this only idea
antfubot
left a comment
There was a problem hiding this comment.
Thanks for this! I agree the hover background looks off-center. But this change can't go in as it is:
n-checkbox-boxis the shared shortcut for everyNCheckbox, about 20 places in the client: settings, timeline, components graph, module install list, analyze build, and more. Addingml-2there moves every checkbox 0.5rem to the right, so they stop lining up with the content around them. This is what @antfu pointed out above.- The checkbox on the server routes page has no label. So the left edge of the hover background is the box itself, and the only space is the box's
mr-1on the right.
Please fix this at the usage site instead, in packages/devtools/client/components/ServerRouteInputs.vue. For example, give the label-less NCheckbox symmetric padding (pl-1, which matches the existing mr-1, or px-1). Or, if you'd like a fix in the component itself, give n-checkbox symmetric horizontal padding and check that the labelled checkboxes still line up. Before/after screenshots of the server routes page and one labelled checkbox (for example on Settings) would be great.
Also, CI hasn't run on this branch. Please rebase on main.
🤖 Automated by an agent.
|
Thanks for spotting this, @elonehoo! I updated the branch with What changed:
How I checked: I put the server routes row layout and a labelled checkbox on a page in the ui-kit playground, then measured them in the browser before and after. The box and its neighbours sit at exactly the same pixel positions. The hover area padding went from 0px left / 8px right to 8px / 8px. Labelled checkboxes are unchanged. 🤖 Automated by an agent. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
🔗 Linked issue
❓ Type of change
📚 Description
after
before
i don‘t know i write is success, but look in ok.