You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Delete the entire html file, switch between v4 and v3 and compare the size of the generated css file.
Describe your issue
Tailwind v4.0 ships all css variables of the default theme, even if they aren't being used. This bloats up the css by a good amount. Default sizes with no classes used in the html:
v3 - 1.16kb
v4 - 4.01kb
The size increased by 345%. Is there a way to strip of unused variables without having to "reset" the default theme and define it manually as described in here?
The text was updated successfully, but these errors were encountered:
GiyoMoon
changed the title
Tailwind v4.0 bundles unused css variables, bloating up the css
[v4] Tailwind bundles unused css variables, bloating up the css
Feb 1, 2025
What version of Tailwind CSS are you using?
v4.0.2
What build tool (or framework if it abstracts the build tool) are you using?
Playground
What version of Node.js are you using?
Playground version
What browser are you using?
Chromium
What operating system are you using?
macOS
Reproduction URL
https://play.tailwindcss.com/
Delete the entire html file, switch between v4 and v3 and compare the size of the generated css file.
Describe your issue
Tailwind v4.0 ships all css variables of the default theme, even if they aren't being used. This bloats up the css by a good amount. Default sizes with no classes used in the html:
v3 - 1.16kb
v4 - 4.01kb
The size increased by 345%. Is there a way to strip of unused variables without having to "reset" the default theme and define it manually as described in here?
The text was updated successfully, but these errors were encountered: