mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 07:42:23 +00:00
fix(ui): keep the sheet scrollbar off the right-aligned labels
The desktop dialog body was the lone scroll port and carried no horizontal padding of its own — the vertical scrollbar rendered flush against its right edge, exactly where a slider's right-aligned high anchor sits, so an overlay scrollbar painted over the last characters of labels like the mood endpoints. Reclaim a 12 px gutter from the dialog's own padding (-mr-3 pr-3): the scrollbar now sits beside the text, content alignment unchanged. Universal to every ResponsiveSheet dialog.
This commit is contained in:
1 parent
2e5061337b
commit
955ef6c6b6
2 files changed
+24
-1
No files matched your search
@@ -320,7 +320,16 @@ export function ResponsiveSheet({
|
||||
// Content that genuinely needs to scroll sideways (a wide table)
|
||||
// owns its own `overflow-x-auto` wrapper — that is the correct
|
||||
// place for it, and it still works inside a clipped port.
|
||||
"flex min-h-0 flex-1 flex-col gap-4 overflow-x-clip overflow-y-auto",
|
||||
//
|
||||
// `-mr-3 pr-3` reclaims a 12 px scroll gutter from the dialog's own
|
||||
// `p-6` padding: the vertical scrollbar would otherwise render flush
|
||||
// against the body's right edge, exactly where a right-aligned child
|
||||
// (a slider's high anchor label) sits, painting on top of the last
|
||||
// characters. The margin gives the padding straight back, so content
|
||||
// alignment is unchanged — the scrollbar just lives beside the text
|
||||
// now, not on it. The mobile Sheet branch has its own `p-4` and
|
||||
// needs nothing.
|
||||
"-mr-3 flex min-h-0 flex-1 flex-col gap-4 overflow-x-clip overflow-y-auto pr-3",
|
||||
bodyClassName,
|
||||
)}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user