Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.5K
Views
Angular material styles are not being applied correctly

I just added styles.css file, but the project is created with scss style configuration. I don't know how to have the styles back on my controls.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

When the application stylesheet is changed within the Angular application, a reference to the Material themes are likely to be in the original stylesheet that contained the imported theme when Material was installed. This can explain why the build and rendered component scripts do not include Material CSS that are still within the original stylesheet.

To fix this issue, try one of the following:

The Angular Material theme is visible when it is included in one of the following areas of your application:

  1. In Angular.json, within the styles section add the location of the Material theme CSS file:

    "styles": [ "./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css", "src/styles.css" ],

  2. In styles.css import one of the Material CSS themes as shown:

    @import "~@angular/material/prebuilt-themes/deeppurple-amber.css";

Rebuild the application so that the referenced styles are bundled into the scripts.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!