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
Documentation for including core styles is not clear #1139
Comments
Workaround for webpack builds: |
In the latest version 2.0.0-alpha.9 this has changed. instead of including overlay and core.css you have to include now a theme eg. ../node_modules/@angular/material/core/theming/prebuilt/purple-green.css You have to change also the Module Import and use only MaterialModule instead of single Modules. It works then |
I appreciate the theming options out of the box! It seems that none of the prebuilt themes match the CSS styling of the previous release ( Is this an oversight? Because it means that to maintain the previous look, we need to build a custom theme. |
I don't even see in the documentation that I have to include the css. I only make it work by searching the web. edited: It's here: https://github.com/angular/material2/blob/master/docs/theming.md simply put this in your index.html header: If this doesn't work for you try this: |
Even though it's described in the https://github.com/angular/material2/blob/master/GETTING_STARTED.md, it would be good to make it more clear that it's a requirement, and really need to be included. |
I must point out @tommysella comment, I've spent some precious time finding out why the components were not styling correctly, till I included a theme. It doesn't looks like required in the docs. |
Closed by #1447. |
Ok I just gonna let that here because I had to modify a bit the solution of @artiz and @elvirdolic First install
Then in your module import like following
This tutorial about how to include material might also be useful https://github.com/AngularClass/angular-starter/wiki/How-to-include-Material |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
As of alpha.7, applications using the components need to include the core styles in addition to individual components.
@angular/material/core
.Missing these styles can manifest several odd effects, such as:
The text was updated successfully, but these errors were encountered: