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

Tailwind v4 Compatibility? #66

Open
rj-elias opened this issue Dec 18, 2024 · 13 comments
Open

Tailwind v4 Compatibility? #66

rj-elias opened this issue Dec 18, 2024 · 13 comments

Comments

@rj-elias
Copy link

Is this plugin compatible with Tailwindcss v4?

https://fluid.tw/#installation

Since v4 use rem by default for breakpoints and font size I guess point 3 is no more relevant.
But how can I add the extractor in tailwind css v4 since it doesn't use tailwind.config.js anymore.

@barvian
Copy link
Owner

barvian commented Dec 18, 2024

Hi, it will very likely need a rewrite for Tailwind v4 but I don't want to start working on it until the plugin API is finalized/documented 😶.

@barvian barvian closed this as completed Dec 18, 2024
@barvian barvian reopened this Dec 18, 2024
@daphen
Copy link

daphen commented Dec 18, 2024

Pretty weird that v4 doesn't have clamp support out of the box to be honest. Have you asked Adam about this?

@barvian
Copy link
Owner

barvian commented Dec 19, 2024

Pretty weird that v4 doesn't have clamp support out of the box to be honest. Have you asked Adam about this?

@daphen I have not but if you can get a hold of him I'd be curious to hear his thoughts! I'd imagine it'd be a pretty big lift so I'm not expecting a surprise announcement on that front but who knows 😅

@barvian barvian pinned this issue Jan 2, 2025
@barvian barvian changed the title Compatible with tailwindcss v4? Tailwind v4 Compatibility? Jan 2, 2025
@deinternetarchitect
Copy link

Is there any update on the progress of this, when will it work with tailwind v4?

@barvian
Copy link
Owner

barvian commented Jan 23, 2025

Hi, no update but I'm planning to look into this over the next few weekends 👍

@abeerance
Copy link

You actually won't need this library anymore, since tailwind will be using the @theme directive.
You can just use something like this:

@theme { --text-2xs: clamp(0.25rem, 0.162rem + 0.3756vw, 0.5rem); --text-xs: clamp(0.5rem, 0.412rem + 0.3756vw, 0.75rem); --text-s: clamp(0.75rem, 0.662rem + 0.3756vw, 1rem); --text-m: clamp(1rem, 0.8239rem + 0.7512vw, 1.5rem); --text-l: clamp(1.5rem, 1.1479rem + 1.5023vw, 2.5rem); --text-xl: clamp(2rem, 1.4718rem + 2.2535vw, 3.5rem); --text-2xl: clamp(3rem, 2.2958rem + 3.0047vw, 5rem); --text-3xl: clamp(4.0625rem, 2.8521rem + 5.1643vw, 7.5rem); }

And it will work out of the box. You can just overwrite every possible thing such as padding directly.

@barvian
Copy link
Owner

barvian commented Jan 28, 2025

You actually won't need this library anymore, since tailwind will be using the @theme directive. You can just use something like this:

@theme { --text-2xs: clamp(0.25rem, 0.162rem + 0.3756vw, 0.5rem); --text-xs: clamp(0.5rem, 0.412rem + 0.3756vw, 0.75rem); --text-s: clamp(0.75rem, 0.662rem + 0.3756vw, 1rem); --text-m: clamp(1rem, 0.8239rem + 0.7512vw, 1.5rem); --text-l: clamp(1.5rem, 1.1479rem + 1.5023vw, 2.5rem); --text-xl: clamp(2rem, 1.4718rem + 2.2535vw, 3.5rem); --text-2xl: clamp(3rem, 2.2958rem + 3.0047vw, 5rem); --text-3xl: clamp(4.0625rem, 2.8521rem + 5.1643vw, 7.5rem); }

And it will work out of the box. You can just overwrite every possible thing such as padding directly.

Hi, you could already do this in Tailwind v3 and it works well. The goal of this plugin is to let you generate these values on-the-fly in any utility using your existing theme values 👍

@abeerance
Copy link

You actually won't need this library anymore, since tailwind will be using the @theme directive. You can just use something like this:
@theme { --text-2xs: clamp(0.25rem, 0.162rem + 0.3756vw, 0.5rem); --text-xs: clamp(0.5rem, 0.412rem + 0.3756vw, 0.75rem); --text-s: clamp(0.75rem, 0.662rem + 0.3756vw, 1rem); --text-m: clamp(1rem, 0.8239rem + 0.7512vw, 1.5rem); --text-l: clamp(1.5rem, 1.1479rem + 1.5023vw, 2.5rem); --text-xl: clamp(2rem, 1.4718rem + 2.2535vw, 3.5rem); --text-2xl: clamp(3rem, 2.2958rem + 3.0047vw, 5rem); --text-3xl: clamp(4.0625rem, 2.8521rem + 5.1643vw, 7.5rem); }
And it will work out of the box. You can just overwrite every possible thing such as padding directly.

Hi, you could already do this in Tailwind v3 and it works well. The goal of this plugin is to let you generate these values on-the-fly in any utility using your existing theme values 👍

Ah sweet didn't know that, excited what you come up with then :)

@Amiejah
Copy link

Amiejah commented Jan 31, 2025

while the @theme solution is nice! Are you still planning to update this package though? I really like the way we can "tailwindify" our projects by using the class & utilities.

@barvian
Copy link
Owner

barvian commented Jan 31, 2025

while the @theme solution is nice! Are you still planning to update this package though? I really like the way we can "tailwindify" our projects by using the class & utilities.

Hi, I'm still planning on it yes. Tailwind v4 doesn't have an upgrade guide for third-party plugins, or any official API for third-party plugins in general, so there's a bit more guesswork than I would've hoped. v4 also silently dropped support for custom extractors, so it will definitely require a complete rewrite.

@joffreypersia
Copy link

Thank you for your work @barvian
Glad to see that it is planned

@kjwessa
Copy link

kjwessa commented Feb 20, 2025

Appreciate all you're doing @barvian and am also pumped to know you're still planning work on this.

@stijns96
Copy link

Was this what you were waiting for? https://github.com/tailwindlabs/tailwindcss/releases/tag/v4.0.9

Make JS APIs available to plugins and configs in the Standalone CLI

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

9 participants