Skip to content

image-set property not converting correctly #17835

Closed
@y-anzai-colsis

Description

@y-anzai-colsis

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

bg-[image-set(url(/images/header-bg.jpg.avif)_type('image/avif'),url(/images/header-bg.jpg)_type('image/jpeg'))]
↓↓↓
.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'));
}

transformation of reality

bg-[image-set(url(/images/header-bg.jpg.avif)_type('image/avif'),url(/images/header-bg.jpg)_type('image/jpeg'))]
↓↓↓
.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(1x) type("image/jpeg"));
  background-image:image-set(url(/images/header-bg.jpg.avif) 1x type("image/avif"),url(1x) type("image/jpeg"))
}

url(1x) is wrong

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions