Search code examples
sassmaterialize

How do you override the existing Sass with your own styles in Materialize?


When working with Sass for Materialize and wanting to add my own .scss code to a project is it a better practice to directly modify the existing .scss files within the project, or to create your own separate .scss files, compile them to a different .css and refer to it at a later point in an HTML file to override the existing styles?


Solution

  • I would suggest never overwrite the classes of any library's .css or .sccs file if you are using some library like materialize or bootstrap.

    Always create your own custom classes and use your CSS to modify the layout. Use your own CSS selectors while writing classes.