Repository navigation
Compile Tailwind once so spacing utilities are not flattened in production - #2324
Conversation
…ction Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Thank you for submitting your pull request! 🙌 We'll review it asap. The estimated time for response is 5–8 hrs. In the meantime, please provide all necessary screenshots and make sure you run - npm build run , command and provide a screenshot, if it's a Video -LEGEND, which helps speed up the review. If you have questions, reach out to LinkedIn. You can see in our Leaderboard in 20 min from now!😊 Note: I maintain the repo issue every day twice at 8:00 AM IST and 9:00 PM IST. If your PR goes stale for more than one day, you can tag and comment on this same issue by tagging @sanjay-kv. We are here to help you on this journey of open source. Consistent 20 contributions are eligible for sponsorship 💰 🎁 check our list of amazing people we sponsored so far: GitHub Sponsorship. ✨ 📚Your perks for contribution to this community 👇🏻
Thanks again for your contribution! 😊 |
|
🎉 Your pull request has been successfully merged! 🎉 Thank you for your valuable contribution to our project. I would be grateful if you can nominate for keeping this opensource project live and running Link to Nominate. Please do star the repo and Keep up the fantastic work! 🚀 |
Summary
p-6,pl-4andmx-autowere being overridden by Tailwind's own base reset (* { padding: 0; margin: 0 }).src/css/custom.cssandsrc/styles/globals.css, so the theme and base layers were emitted twice. The production CSS minifier dropped the earlier copies, leaving only the utilities layer first and the base reset after it. In CSS layers, later wins, so the reset beat the utilities. A dev server does not minify, so it hid the bug.custom.css, together withtw-animate-cssandstyles/globals.css(which no longer starts its own compile), and drop the separateglobals.cssimport from the dashboard page.Verification
docusaurus buildto a separate folder and checked the stylesheet: the layers now appear once and in the right order (properties, theme, base, components, utilities); the bundle is about 42 KB smaller;.p-6is a plain utility again.dark:utilities now follow the site's theme toggle only (17[data-theme=dark]rules, no OSprefers-color-schemerules). Previously they also followed the operating system's dark setting.Notes