You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that when using tailwind class prefix and installing a UI component, it adds a prefix to a whitespace, if the class definition had multiple whitespaces between classes, essentially adding a class of a tailwind prefix.
Affected component/components
AlertDialog, Carousel, Dialog, Sheet
How to reproduce
Setup tailwind prefix (using tw- for this example)
Do a fresh installation of a sheet component
SheetOverlay component and right sheet variant will have tw- classes.
The prefixes work great. What I mean is, that if the component had multiple whitespaces in the class definition (like sheet component does), when installing the component, the prefix is added to a whitespace and gives this as a result:
tw- is a prefix, and should not be added as a separate class, which is happening right now.
Here's a link to source code, there are two whitespaces between background color and open state animation classes:
Describe the bug
I noticed that when using tailwind class prefix and installing a UI component, it adds a prefix to a whitespace, if the class definition had multiple whitespaces between classes, essentially adding a class of a tailwind prefix.
Affected component/components
AlertDialog
,Carousel
,Dialog
,Sheet
How to reproduce
tw-
for this example)SheetOverlay
component andright
sheet variant will havetw-
classes.Codesandbox/StackBlitz link
https://codesandbox.io/p/sandbox/react-shadcn-ui-demo-967vh5
Logs
No response
System Info
Before submitting
The text was updated successfully, but these errors were encountered: