Skip to content

Invalid transform: ; Output in Generated CSS with @tailwindcss/[email protected] #18754

@mcdhage98

Description

@mcdhage98

What version of Tailwind CSS are you using?
4.1.1

What build tool (or framework if it abstracts the build tool) are you using?
"vite": "^6.0.5"
"@vitejs/plugin-react": "^4.3.4",
"@tailwindcss/postcss": "4.1.1",

What version of Node.js are you using?
v20.18.2

What browser are you using?
Chrome

What operating system are you using?
macOs

Reproduction URL
clone https://github.com/mcdhage98/ui-component-library
steps to reproduce
1)yarn
2)yarn run build
3) check
https://github.com/mcdhage98/ui-component-library/blob/0c6e23b426b24053443ec193fdb952fb87353b12/dist/styles/index.css#L965

Image

Describe your issue
Previously i was using "@tailwindcss/postcss": "^4.0.7",
was getting proper class after build
.ui:transform {
transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
}

after upgradation to 4.1.1
im getting extra line "transform: ; "
.ui:transform {
transform: ;
transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
}

Error
Im using this library in a project which uses sass
The error occurs during the build process in the sass-loader when processing the CSS file located at ./node_modules/ui-components/dist/styles/index.css. Specifically, at line 965, column 25, there is an invalid transform property with an empty value (transform: ;), causing a SassError: Expected expression. This breaks the build because Sass expects a valid expression after the transform property. The issue is likely caused by a misconfiguration in the PostCSS pipeline,

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