Angular Material theme not working properly. #603

Closed
opened 2025-08-09 17:16:56 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @rasert on 7/7/2017

Hi.

I have created a new project from the Angular template using "dotnet new".
After that, I added the angular/material, angular/cdk and angular/flex-layout packages via "npm add".

After writing some html with material components, I added a link to the Pink-BlueGrey.css to the _Layout.cshtml (manually copied the css file to the wwwroot folder).

The theme worked, the toolbar in the page is properly styled, but every html that is not contained within a material component is not being styled at all. Everything just stays pure and simple. I don't understand why, because if I create a project using the Angular CLI, then everything is styled the way it should be after applying the theme.

Can someone point me in the right direction?

I tried to include the css file into the vendors bundle on the webpack vendors config file, but it works the same way. I don't wanna have to make a custom css file to work with everything that is not contained in a Angular Material component.

Any help would be very appreciated.
Thanks in advance.

*Originally created by @rasert on 7/7/2017* Hi. I have created a new project from the Angular template using "dotnet new". After that, I added the angular/material, angular/cdk and angular/flex-layout packages via "npm add". After writing some html with material components, I added a link to the Pink-BlueGrey.css to the _Layout.cshtml (manually copied the css file to the wwwroot folder). The theme worked, the toolbar in the page is properly styled, but every html that is not contained within a material component is not being styled at all. Everything just stays pure and simple. I don't understand why, because if I create a project using the Angular CLI, then everything is styled the way it should be after applying the theme. Can someone point me in the right direction? I tried to include the css file into the vendors bundle on the webpack vendors config file, but it works the same way. I don't wanna have to make a custom css file to work with everything that is not contained in a Angular Material component. Any help would be very appreciated. Thanks in advance.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#603
No description provided.