InfomediaLtd / angular2-materialize

Angular 2 support for Materialize CSS framework.
https://infomedialtd.github.io/angular2-materialize/
MIT License
407 stars 140 forks source link

Importing materialize.css breaks all my styles #375

Closed carol-braileanu closed 6 years ago

carol-braileanu commented 7 years ago

I only use the Autocomplete feature in Materialize in my application. I installed angular2-materialize and I added materialize-css references for the js and css files. I noticed however that all the styles in my app have been overwritten by the materialize-css styles. Is there a way to prevent this from happening and only apply materialize styles to the controls I need?

rubyboy commented 7 years ago

Unfortunately, the MaterializeCSS itself is global, thus applying all styles globally. But, MaterializeCSS provides a way to override its own SCSS. You can find a small example here: https://github.com/InfomediaLtd/angular2-materialize/blob/master/sample/src/styles.scss