csssassangular-material2angular-material-theming

How apply custom Angular Material Theme without SCSS?


I'm working in a corporate environment which is making it extremely difficult to try and get SCSS working on our build server. Is there a way to apply custom Angular Material 2 theme using custom color palettes as plain CSS instead?


Solution

  • Material comes with a couple pre-built themes available as plain .css files, as documented here.

    If you have an existing custom theme in .scss, you can convert it to .css using the command

    $ node_modules\.bin\node-sass.cmd src\theme.scss > theme.css