DEV Community

Discussion on: Building Tailwind CSS in an Angular CLI project

Collapse
 
beavearony profile image
Michael Gustmann

Actually this works exactly like described in the post. The styles.(s)css where material is added is not touched by this approach.
So, after you completed the steps above do

ng add @angular/material

answer a few questions and you're done.

Collapse
 
jahnreektor profile image
jahnreektor

Unfortunately, ng add doesn't work because we have changed the builder:

Your project is not using the default builders for "build". The Angular Material schematics cannot add a theme to the workspace configuration if the builder has been changed.

Thread Thread
 
georgeisbusting profile image
Stephen Ferjanec

You can add the styles in yourself:

For example, under architect, build, add indigo-pink.css to your styles array:
"styles": [
"src/styles.css",
"src/tailwind.scss",
"node_modules/@angular/material/prebuilt-themes/indigo-pink.css"
],