tailwindcss icon indicating copy to clipboard operation
tailwindcss copied to clipboard

Invalid css transformation on build

Open emirhangumus opened this issue 1 year ago • 7 comments

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.

emirhangumus avatar Jan 26 '25 17:01 emirhangumus

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

wongjn avatar Jan 26 '25 20:01 wongjn

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.

mrxbox98 avatar Feb 01 '25 21:02 mrxbox98

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

wongjn avatar Feb 01 '25 21:02 wongjn

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

viettc98 avatar Feb 06 '25 11:02 viettc98

@viettc98 If you are referring to the background-position bug, there is a workaround in the lightnincss issue: https://github.com/parcel-bundler/lightningcss/issues/771#issuecomment-2536413163

So this should work:

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

philipp-spiess avatar Feb 06 '25 13:02 philipp-spiess

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

This is now fixed in Lightning CSS v1.29.2.

ckoca avatar Mar 06 '25 11:03 ckoca

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

This is now fixed in Lightning CSS v1.29.2.

It seems like

Image

titanve avatar Mar 07 '25 14:03 titanve