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

292
Views
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 answers
Answer question

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 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!