Roots Discourse

Adding/Using Materialize CSS to Sage

Hello, I’m new to the WordPress and Sage community, but I think Sage is a great thing and want to use it for WordPress dev.

I’d like to use Materialize CSS (https://materializecss.com) in my Sage theme, but not quite sure how to hook everything up, so if anyone has experience using a non-included CSS framework, I’d love to know how you did it.

So far, I’ve npm install --save materialize-css.

That added the node_module, so I feel like I need to do something with webpack.config.js maybe? And, I guess I still get to use the files in resources > assets > styles?

Any nudges in the right direction would be helpful, thanks!

Here’s my more detailed Stack Overflow question (Part 1): https://stackoverflow.com/questions/56615546/css-import-materlize-css-using-webpack-no-style-being-made

Question (Part 2): https://stackoverflow.com/questions/56621791/materialize-module-build-failed-invalid-css-expected-selector