-
Stackblitz doesn't show you built files, so I've recreated the problem in a Github repo. It appears as thoughunused classes are not being removed from the compiled CSS as they should be. We're following the instructions on the DaisyUI install page and have consulted the example Nuxt project on the Stackblitz page. When we run the commands for this project:
We see that the index page that is generated is quite heavy (43kb) for the content that is on it.When we investigate the response...We see that there are classes included in the page that are not used. Not only are they not used on this page, but they're not used on any of the pages in the project. 'textarea' as a class not used anywhere in this project, for example.In summaryThis may well be a misunderstanding on my part in that I need to do something specific to purge unused classes from my build files, and if that's the case, I'll happily submit a pull request to add that to the documentation, as I believe it's important for others to know. Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
These are not from daisyUI. Here are all of them: https://unpkg.com/[email protected]/src/css/preflight.css You can disable it from Tailwind: https://tailwindcss.com/docs/preflight#disabling-preflight But I would not recommend removing it, because without this reset file, all elements will use the default browser styles (which sometimes are different for each browser) and you will experience some unexpected UI issues in different browsers. The whole size of this reset file is so small that removing it wouldn't make change. Let me know if you have a question. |
Beta Was this translation helpful? Give feedback.
These are not from daisyUI.
daisyUI styles
.textarea
class name not thetextarea
element itself.These styles are the default reset styles of Tailwind CSS called "preflight" and is included in all Tailwind projects by default:
https://tailwindcss.com/docs/preflight
Here are all of them: https://unpkg.com/[email protected]/src/css/preflight.css
You can disable it from Tailwind: https://tailwindcss.com/docs/preflight#disabling-preflight
But I would not recommend removing it, because without this reset file, all elements will use the default browser styles (which sometimes are different for each browser) and you will experience some unexpected UI issues in different browsers.
The whole size…