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

301
Views
How to avoid css overwriting in react.js production

I build a react app with create-react-app and imported all css files as

import '../Styles/dashboardStyles.css'

In the production version all css files get minified and the common css applied to every page instead of the particular page that applied.

E.G

  src/Styles/dashboardStyle.css:

  h1 {
    color: (some color);
  }

  src/Styles/loginStyle.css:

  h1 {
    color: (some other color);
  }

  p {
    color: (some color);
  }

I don't want any color or style from dashboardStyle.css to be applied in loginStyle.css. But, in the minification process the css files get concatted and the styles are mixed up.

Please help me to solve this problem.

about 4 years ago · Juan Pablo Isaza
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!