From cf8b7be7786d2e42832e9c3df87dc977f4412997 Mon Sep 17 00:00:00 2001 From: Carlos Escalante Date: Wed, 29 Apr 2026 22:02:33 -0600 Subject: [PATCH] Fix Tabs orientation selectors Tailwind variants like data-horizontal and group-data-horizontal never match the data-orientation=horizontal attribute Base UI emits, so the flex layout collapsed and TabsList stretched vertically. Switch to data-[orientation=...] selectors that actually fire. Co-Authored-By: Claude Opus 4.7 (1M context) --- frontend/src/components/ui/tabs.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/ui/tabs.tsx b/frontend/src/components/ui/tabs.tsx index 9d9d045..61a3add 100644 --- a/frontend/src/components/ui/tabs.tsx +++ b/frontend/src/components/ui/tabs.tsx @@ -13,7 +13,7 @@ function Tabs({ data-slot="tabs" data-orientation={orientation} className={cn( - "group/tabs flex gap-2 data-horizontal:flex-col", + "group/tabs flex gap-2 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-start", className )} {...props} @@ -22,7 +22,7 @@ function Tabs({ } const tabsListVariants = cva( - "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none", + "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-8 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none", { variants: { variant: { @@ -56,10 +56,10 @@ function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {