Closed
Description
@clydin few things that maybe will help you ensure full TailwindCSS support, based on issues we had in ngneat/tailwind
:
- Tailwind uses PurgeCSS under the hood, which is enabled when
process.env.NODE_ENV
isproduction
, which Angular not setting by default.
https://tailwindcss.com/docs/optimizing-for-production#removing-unused-css
https://twitter.com/Nartc1410/status/1357504574479810568 - Tailwind dark mode directives won't work correctly in component styles with view encapsulation other than
none
, as tailwind will just try to prepend class with.dark
, so the result code will be something like.dark[_ng-content-**] .value[_ng-content-**]
. Also not sure what will happen withShadowDom
, tested only withemulated
. Inngneat/tailwind
we made PostCSS plugin for it: https://github.com/vltansky/postcss-ng-tailwind-in-components. Probably there are alternative solutions.
https://github.com/ngneat/tailwind/issues/54
relevant to: 73b4098