Skip to content
New issue

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

[TW Merge] Leading gets removed by arbitrary font size #65

Open
stijns96 opened this issue Dec 12, 2024 · 2 comments
Open

[TW Merge] Leading gets removed by arbitrary font size #65

stijns96 opened this issue Dec 12, 2024 · 2 comments

Comments

@stijns96
Copy link

Hi there,

first of all, this plugin is great! I do have a small issue tho...

It looks like tw merge is removing my leading class, while I don't have a leading applied with fluid. I also don't use the fontSize from fluid, as I don't want the default line-height to be set. I always wondered why tailwind adds this out of the box, since this is in most project far from ideal... But that is another topic :)

cva("font-bold leading-tight", {
    variants: {
      level: {
        1: "~text-[3.815rem]/[5.61rem]",
        2: "~text-[3.052rem]/[4.209rem]",
        3: "~text-[2.441rem]/[3.157rem]",
        4: "~text-[1.953rem]/[2.369rem]",
        5: "~text-[1.563rem]/[1.777rem]",
        6: "~text-[1.25rem]/[1.333rem]",
      },
    },
  }),

image

As you can see in the image above, there is no leading class in my element.

@stijns96
Copy link
Author

Update
Thanks to #18 I found a workaround by adding ! in front of my leading class. Of course not what I really want as adding !important is really bad IMO.

Still like to see this working out of the box :)

@barvian
Copy link
Owner

barvian commented Dec 12, 2024

Nice catch! I'll look into supporting this.

@barvian barvian changed the title Settings default leading class with TW Merge not working [TW Merge] Leading gets removed by arbitrary font size Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants