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

277
Visualizações
Change Sass module variables in react

I have a variable in my Card.module.scss and use this code to export it make it available to my React components:

$max-width: 100%;

:export {
    maxWidth: $max-width
}

I import this and the rest of the styles with:

import styles from "../styles/Card.module.scss"

and I'm able to access this value using styles.maxWidth, but I don't know how to change the value.

I know it would be easier to use CSS custom properties, but that would not work in modules, as it would not be a pure selector.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I don't believe it's actually possible: SaSS is compiled on build into regular CSS, so it makes no sense to try and modify it at runtime. You will probably have to use custom properties...

If anyone more knowledgable can confirm...

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