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

Invalid css transformation on build #15897

Open
emirhangumus opened this issue Jan 26, 2025 · 7 comments
Open

Invalid css transformation on build #15897

emirhangumus opened this issue Jan 26, 2025 · 7 comments

Comments

@emirhangumus
Copy link

emirhangumus commented Jan 26, 2025

What version of Tailwind CSS are you using?

v4.0.0

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

svelte 5.19.2, tailwindcss/vite 4.0.0, vite 6.0.11

What version of Bun js are you using?

v1.2.0

What browser are you using?

Zen Browser (Firefox)

What operating system are you using?

Ubuntu 22.04

Reproduction URL

https://play.tailwindcss.com/czuZLwTt4a

Describe your issue

On development mode
On production mode

The bug is, i have a class like this lg:bg-[center_bottom_-15rem] and on development mode, tailwind puts all thing as is. When build the app, transformation is convert that into invalid status.
center turning into 50% and its invalid.
Expectation is, not creating a invalid value.

@wongjn
Copy link
Contributor

wongjn commented Jan 26, 2025

Seems like a bug in Lightning CSS: parcel-bundler/lightningcss#771

@mrxbox98
Copy link

mrxbox98 commented Feb 1, 2025

I'm facing a similar issue when I use text-[#C0C0C0]/50. On dev its is color-mix(in oklab, #C0C0C0 50%, transparent); which is fine, but once it's built it becomes oklab(80.7796% --11 .9209e-8 5.96046e-8 / .5); which is invalid css.

@wongjn
Copy link
Contributor

wongjn commented Feb 1, 2025

A different bug in Lightning CSS: parcel-bundler/lightningcss#899

@viettc98
Copy link

viettc98 commented Feb 6, 2025

Have anyone handle this bug guys, I just faced this bug.

@philipp-spiess
Copy link
Member

philipp-spiess commented Feb 6, 2025

@viettc98 If you are referring to the background-position bug, there is a workaround in the lightnincss issue: parcel-bundler/lightningcss#771 (comment)

So this should work:

lg:bg-[left_50% _bottom_-15rem]

@ckoca
Copy link

ckoca commented Mar 6, 2025

A different bug in Lightning CSS: parcel-bundler/lightningcss#899

This is now fixed in Lightning CSS v1.29.2.

@titanve
Copy link

titanve commented Mar 7, 2025

A different bug in Lightning CSS: parcel-bundler/lightningcss#899

This is now fixed in Lightning CSS v1.29.2.

It seems like

Image

RobinMalfait pushed a commit that referenced this issue Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants