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

calc() broken in v4: Invalid property value, expected type "<length> | <percentage>" #14277

Open
probablykasper opened this issue Aug 28, 2024 · 3 comments
Assignees

Comments

@probablykasper
Copy link

What version of Tailwind CSS are you using?

For example: 4.0.0-alpha.20

What build tool (or framework if it abstracts the build tool) are you using?

For example: Vite 5.4.2

What version of Node.js are you using?

For example: v20.15.0

What browser are you using?

For example: Brave

What operating system are you using?

For example: macOS

Reproduction URL

https://play.tailwindcss.com/CLyjwhj0qQ

Describe your issue

The same code does work in v3. Setting the CSS variable's syntax property from "<length> | <percentage>" to "<length-percentage>" fixes it.

@philipp-spiess
Copy link
Member

philipp-spiess commented Aug 28, 2024

@probablykasper Thank you for the report! We confirmed that this fix works for the latest version of Chrome/Safari/Firefox. We changed this specifically to `" | " in the past though: #13660. This was likely an issue with Firefox nightly at the time. cc @thecrypticace

Update: The issue why we changed this in the first place does still exist in Firefox though so this needs a bit more work: https://codepen.io/thecrypticace/pen/dyEbBdo

@probablykasper
Copy link
Author

probablykasper commented Aug 28, 2024

Haven't tried it, but maybe "<length-percentage> | <length> | <percentage>" works

@thecrypticace
Copy link
Contributor

Interesting idea! Sadly that does not work 😭 — I updated the code pen with that change here: https://codepen.io/thecrypticace/pen/dyEbBdo

Still broken in FF

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

3 participants