Describe the bug
With the variables: true configuration option, PurgeCSS can remove unused variables declared like this:
:root {
--tw-rotate-x: rotateX(0);
}
However, it doesn't remove the fairly recently introduced @property rule like this:
@property --tw-rotate-x-2 {
syntax: '*';
inherits: false;
initial-value: rotateX(0);
}
To Reproduce
- Go to https://stackblitz.com/edit/vitejs-vite-ogqm14x7?file=style.css&terminal=build
- Wait for the build to finish or run
npm run build in the terminal.
- Inspect the CSS file in the
dist/assets folder.
Expected Behavior
CSS variables declared using @property should be removed
Environment
N/A
Add any other context about the problem here
No response
Code of Conduct
Describe the bug
With the
variables: trueconfiguration option, PurgeCSS can remove unused variables declared like this:However, it doesn't remove the fairly recently introduced
@propertyrule like this:To Reproduce
npm run buildin the terminal.dist/assetsfolder.Expected Behavior
CSS variables declared using
@propertyshould be removedEnvironment
N/A
Add any other context about the problem here
No response
Code of Conduct