Skip to content

Tailwind support #20015

Closed
Closed

Description

@clydin few things that maybe will help you ensure full TailwindCSS support, based on issues we had in ngneat/tailwind:

  1. Tailwind uses PurgeCSS under the hood, which is enabled when process.env.NODE_ENV is production, which Angular not setting by default.
    https://tailwindcss.com/docs/optimizing-for-production#removing-unused-css
    https://twitter.com/Nartc1410/status/1357504574479810568
  2. 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 with ShadowDom, tested only with emulated. In ngneat/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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions