ui
ui copied to clipboard
Select and TextArea components duplicated border classes
Hi, I love the new update, it's awesome ❤️
I found that the border-neutral-200 and dark:border-neutral-800 classes on the select.tsx component are duplicated.
I'm using "cssVariables": false.
The duplicate class is caused by this:
https://github.com/shadcn/ui/blob/aea12e97623699e7c7b2d75fc671ea21b0cf8887/packages/cli/src/utils/transformers/transform-css-vars.ts#L143-L145
When a component has the border class it gets replaced with border border-border and, since the select has already border-input this brings two border color classes when the colors are resolved.
List of affected components:
selecttextarearadio-groupalert(destructive variant)checkboxinput
I encountered this issue with the radio-group and checkbox components today.
On the Checkbox component I get border-gray-200 border-gray-900 and dark:border-gray-50 dark:border-gray-800.
On the RadioGroupItem component I get border-gray-200 border-gray-900 and dark:border-gray-50 dark:border-gray-800.
I am using the latest tag for the cli command.
My components.json is
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/styles/globals.css",
"baseColor": "gray",
"cssVariables": false,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
EDIT: I am blind. There is another issue link right above.