Skip to content

Commit 79f5948

Browse files
committed
Keep a row's words at least 128px, so narrow rows wrap their actions
Admin > People at 390px: without the tile and the card's padding, the Admin switch and Remove fit beside a long name and left it under 120px. With a floor on the words the actions wrap onto their own line.
1 parent 3c2b244 commit 79f5948

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎app/src/components/layout/page-parts.tsx‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,12 @@ export function PageRows({
244244
*/
245245
"-mx-2 mt-2",
246246
"[&_[data-slot=item]]:rounded-md [&_[data-slot=item]]:px-2 [&_[data-slot=item]]:min-h-12",
247+
/*
248+
* A row's words keep at least 128px. Without a tile and a card's padding a row has more room,
249+
* so on a phone its actions could just fit beside a long name and leave it a sliver: with a
250+
* floor on the words, the actions wrap onto a line of their own instead.
251+
*/
252+
"[&_[data-slot=item-content]]:min-w-32",
247253
"[&_[data-slot=separator][data-orientation=horizontal]]:mx-2 [&_[data-slot=separator][data-orientation=horizontal]]:w-auto",
248254
// A list right under another reads as one, with a divider where the two meet.
249255
"[[data-slot=page-rows]+&]:mt-0 [[data-slot=page-rows]+&]:before:mx-2 [[data-slot=page-rows]+&]:before:block [[data-slot=page-rows]+&]:before:h-px [[data-slot=page-rows]+&]:before:bg-border",

0 commit comments

Comments
 (0)