Optimizing the Tailwind CSS build when using Angular with Angular Material?

Discussão em 'Angular' iniciado por Ole, Novembro 5, 2024.

  1. Ole

    Ole Guest

    Tailwind CSS builds an optimized CSS file by scanning html for CSS classes used an only including the classes that are declared in the HTML file class attributes.

    But what if we are dynamically applying classes based on component state, and not including these classes initially in the any of the template class attributes?

    Does Tailwind have a way of handling this?

    This also happens for Angular Material Components or other UI libraries.

    So for example if we are using Angular Material how would we configure the tailwind build to ensure that classes that are applied dynamically based on component state are included in the optimized tailwind build?

    Continue reading...

Compartilhe esta Página