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

293
Visualizações
CSS doesn't work when classes are applied directly in HTML

I'm running NX workspace with multiple apps in it as a monorepo. Recently I installed I've installed "tailwindcss": "^3.0.2". Here are my configs:

1. Package.json with dev dependencies

package.json

2. tailwind.config.js configured

tailwind.config.js

Issues facing:

  1. In SCSS file where I'm using button mixins by applying tailwind classes & re-using my own custom button classes (Works) enter image description here

  2. Tailwind lib classes applied directly in HTML file for ex: "container mx-auto", "uppercase" (Doesn't work as styles are not applied) enter image description here

Am Not sure why when tailwind lib classes when applied directly on html classes are not working where as when applied through scss files are working. Any idea?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

The problem is with the path to the source files (content) which tailwind is unable to find. You need to modify content in your tailwind.config.js to following:

content: [
    './apps/**/src/**/*.{html,ts}', 
    './libs/**/*.html'
], 
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