forked from unom/punktfunk
fix(web): the logs filter row stops touching the card's edge on desktop
Found on glass. The logs card has no CardHeader, so it puts the top padding back itself — but only at one breakpoint. `CardContent` is `p-4 pt-0 sm:p-6 sm:pt-0`, and tailwind-merge resolves conflicts only within the same variant: a bare `pt-6` cancels `pt-0` and leaves `sm:pt-0` standing. Measured on .173: 24px of top padding at 420px wide, 0px at 1280px, with the level filters and the search box sitting flush against the card border. It is the same trap `components/ui/card.tsx` documents for `p-0` — a variant cancelling its unprefixed counterpart and nothing else — just in the other direction, so the note now points both ways. This card was the only offender. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -213,7 +213,13 @@ export const LogsCard: FC<{
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<CardContent className="flex flex-col gap-3 pt-6">
|
||||
{/* This card has no CardHeader, so it has to put the top padding back itself — and it
|
||||
must do so at BOTH breakpoints. `CardContent` is `p-4 pt-0 sm:p-6 sm:pt-0`, and
|
||||
tailwind-merge only resolves conflicts within the same variant: a bare `pt-6` cancels
|
||||
`pt-0` but leaves `sm:pt-0` standing, so the padding was 24px on a phone and 0 on a
|
||||
desktop, with the filter row touching the card's edge. (Same trap the `p-0` note in
|
||||
components/ui/card.tsx describes, in the other direction.) */}
|
||||
<CardContent className="flex flex-col gap-3 pt-4 sm:pt-6">
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<div className="flex items-center gap-1">
|
||||
{LEVELS.map((l) => (
|
||||
|
||||
Reference in New Issue
Block a user