We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I opened the issue in cva 335 but after some digging, I think is related to TW merge 🤔 looks like some classes are removed from the final class list.
The classes I'm having a problem with are font-xxx & leading-xxx
font-xxx
leading-xxx
This is my config:
import { extendTailwindMerge } from 'tailwind-merge' export const customTwMerge = extendTailwindMerge({ extend: { theme: { spacing: ['0', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', 'auto'], // leading: ['sm', 'md', 'lg'], radius: ['none', 'sm', 'md', 'lg', 'xl', 'round', 'pill'], }, }, })
import clsx, { type ClassValue } from 'clsx' import { customTwMerge } from './tailwind-merge' // export function cn(...inputs: ClassValue[]) { // return customTwMerge(clsx(inputs)) // } export function cn(...inputs) { return customTwMerge(inputs) }
This is the new way I have to do it to make it work, which doesn't seem correct.
The commented out way or even the one posted in the above issue doesn't work anymore with TW4 and the new version of TW Merge
export const Typography = ({ as, size, bold, light, className, children, ...props }: Props) => { const TypographyTag = React.createElement<any>( as, { className: `font-secondary font-normal leading-md tracking-md mb-md ${cn(typographyVariants({ size, bold, light }), className)}`, // className: `${cn(`font-secondary font-normal leading-md tracking-md mb-md ${typographyVariants({ size, bold, light })}`, className)}`, ...props, }, children ) return TypographyTag }
Especially because I can override one of those classes that doesn't work, like this:
<Typography as='span' className={cn( `font-tertiary mx-auto ${index === 2 ? 'text-red-500' : 'text-neutral-white'}` )} > {price ? price : '/'} </Typography>
both font-xxx & leading-xxx should be applied to the final class list.
The text was updated successfully, but these errors were encountered:
I'm having the same issue with "leading-" not being set when it's inside the first argument.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
I opened the issue in cva 335 but after some digging, I think is related to TW merge 🤔 looks like some classes are removed from the final class list.
The classes I'm having a problem with are
font-xxx
&leading-xxx
To Reproduce
This is my config:
This is the new way I have to do it to make it work, which doesn't seem correct.
Especially because I can override one of those classes that doesn't work, like this:
Expected behavior
both
font-xxx
&leading-xxx
should be applied to the final class list.The text was updated successfully, but these errors were encountered: