-
Notifications
You must be signed in to change notification settings - Fork 4.5k
image-set property not converting correctly #17835
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
Comments
At least in Tailwind Play, it generates fine: .bg-\[image-set\(url\(\/images\/header-bg\.jpg\.avif\)_type\(\'image\/avif\'\)\,url\(\/images\/header-bg\.jpg\)_type\(\'image\/jpeg\'\)\)\] {
background-image: image-set(url(/images/header-bg.jpg.avif) type('image/avif'),url(/images/header-bg.jpg) type('image/jpeg'));
} In Lightning CSS playground (Tailwind uses it in production), the non-prefixed version has no .bg-\[image-set\(url\(\/images\/header-bg\.jpg\.avif\)_type\(\'image\/avif\'\)\,url\(\/images\/header-bg\.jpg\)_type\(\'image\/jpeg\'\)\)\] {
background-image: -webkit-image-set(url("/images/header-bg.jpg.avif") 1x type("image/avif"), url("/images/header-bg.jpg") 1x type("image/jpeg"));
background-image: image-set("/images/header-bg.jpg.avif" 1x type("image/avif"), "/images/header-bg.jpg" 1x type("image/jpeg"));
} Perhaps it's some Vite/Astro thing? |
Thank you! Lightning adds 1x, and url() is converted like text. I'll try writing it differently and see what happens. |
I converted it correctly when I used a Vite project instead of Astro! I'm not sure yet, but it seems to be caused by Astro. I'll close it and check on the Astro side. Thank you!!! |
What version of Tailwind CSS are you using?
v4.0.17
What build tool (or framework if it abstracts the build tool) are you using?
Astro v5.5.5
@tailwindcss/vite v4.0.17
What version of Node.js are you using?
v22.12.0
What browser are you using?
Chrome
What operating system are you using?
macOS
ideal transformation
transformation of reality
url(1x) is wrong
The text was updated successfully, but these errors were encountered: