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

98
Vistas
Trying to understand how some css is being used in the application via Postcss and cssnext

I'm a newbie developer taking a look at an application and I'm a bit puzzled but want to understand how some css is working. I've done some reading and research but my knowledge around how it's built is limited:

1 - The app contains a file e.g. style1.js which has some code such as

module.exports = {
   primary: 'red'
}

2 - There is then another style file for a component e.g. header.css which has

.header {
   color: var(--primary);
}

With some research I've learned that there is a tool called Postcss which is being used here which lets the primary variable be replaced with the value from the js file. However I don't see the file style1.js being imported in either the component or in this style file, so not sure how it gets access to the 'primary' variable.

3 - When the app is built and run and I inspect the source, I see a few styles for the page and when I inspect the bundle.js file I see in various sections all the other styles in here, they're laid out in this way:

eval("module.exports = ....lots of other code and styles
    primary: 'red'
);

I'd like to know how these styles might be ending up here in this way and then how they're being applied to elements on the page, as they're not in a stylesheet or in the style tags at the top of the page which I know Webpack can do.

Any information to help connect the dots here would be great. The app is being built through Webpack.

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