mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 22:32:04 +00:00
feat(lint): guard the gap-based Card slots against padding overrides
Add healthlog/spacing-scale (error): pt-*/pb-* on CardHeader/CardContent fights the gap-based Card contract — the header→body distance comes from the parent flex gap, so slot padding stacks on top of it or is a no-op. This is the drift class the earlier slot-padding sweep cleaned; the rule keeps it from reaccumulating. Density belongs on the Card itself (gap-2 py-3 md:py-4). No allowlist — an exception, should one ever be load-bearing, carries an inline disable with its reason. Remove the two stragglers the rule caught: pb-1 on the device-score tile and pb-4 md:pb-6 on the intake history list, both stacking dead padding on top of the card gap. RuleTester coverage for the modifier-prefixed, arbitrary-value, cn()/ternary/template and member-expression forms.
This commit is contained in:
1 parent
e9692f0b81
commit
68b4dd08a7
6 files changed
+290
-2
No files matched your search
@@ -121,7 +121,7 @@ export function DeviceScoreTile({
|
||||
</CardAction>
|
||||
) : null}
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-3 pb-1">
|
||||
<CardContent className="space-y-3">
|
||||
{isLearning ? (
|
||||
<LearningGate
|
||||
compact
|
||||
|
||||
@@ -238,7 +238,7 @@ export function IntakeHistoryListV2({
|
||||
{t("medications.intakeHistory")}
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent className="pb-4 md:pb-6">
|
||||
<CardContent>
|
||||
{isLoading ? (
|
||||
<div className="flex h-24 items-center justify-center">
|
||||
<Loader2 className="text-muted-foreground h-5 w-5 animate-spin motion-reduce:animate-none" />
|
||||
|
||||
Reference in new issue
Block a user