Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.5K
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda