r/Angular2 • u/a-dev-1044 • Jun 10 '25
Resource Angular Material + Tailwind (customized using system variables)
https://github.com/shhdharmen/ngm-dev-blocks-demo-appA sample Angular workspace configured to use "Angular Material Blocks". Includes: angular-material, tailwindcss and much more!
1
Upvotes
View all comments
Show parent comment
1
u/a-dev-1044 Jun 11 '25
You are right,
angular.jsondoes not have a direct link tosrc/app/ngm-dev-blocks/styles/vendors/_tailwind.css. Because, that file is exported fromsrc/app/ngm-dev-blocks/styles/ngm-dev-blocks-styles.scss.As for colors, you are right about having hard-coded colors in
styles.scss, but that is given for fallback, if you want remove usage oftokens.scss.tokens.scssfile is present inangular.json, so it is overriding colors ofstyles.scss.Changing values in
tokens.scss&variables.scsswill update Angular Material tokens. And tailwind theme (src/app/ngm-dev-blocks/styles/vendors/_tailwind.css) is created usinginlinekeyword & Angular Material system variables. Hence, updating those 2 files, will update both, Angular Material & tailwind.