Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing materialize.css breaks all my styles #375

Closed
carol-braileanu opened this issue Sep 24, 2017 · 1 comment
Closed

Importing materialize.css breaks all my styles #375

carol-braileanu opened this issue Sep 24, 2017 · 1 comment

Comments

@carol-braileanu
Copy link

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
Copy link
Contributor

rubyboy commented Sep 25, 2017

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

@rubyboy rubyboy closed this as completed Oct 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants