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

Dynamic speed #5

Open
aitormendez opened this issue Aug 5, 2024 · 1 comment
Open

Dynamic speed #5

aitormendez opened this issue Aug 5, 2024 · 1 comment

Comments

@aitormendez
Copy link

aitormendez commented Aug 5, 2024

Trying to apply dynamic speed this way:

className={`[--duration:${speed}s]`}

This results in a very slow and always the same scroll speed, regardless of the speed value.

Hardcoding, it works:

className={`[--duration:10s]`}
console.log(`[--duration:${speed}s]`) // returns the right value: [--duration:5s]

Any ideas?

@devnomic
Copy link
Owner

Hi sorry for late reply,
As far as i know this are tailwindcss limitation, you can't use dynamic value like that without configuring it in the config.

https://tailwindcss.com/docs/content-configuration#dynamic-class-names

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