Closed
Description
openedon Feb 10, 2021
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment