Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

303
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda