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

221
Views
Next js - how to override style in scss

I'm using react-simple-keyboard and I try to override below style from this library
enter image description here

by using scss

keyboard.module.scss

.react-simple-keyboard{
  width: 50% !important;
}

components/keyboard/index.js

import keyboardStyle from "./keyboard.module.scss";
...
// Do something using keyboardStyle

However, I've found there's no update on the style.

I've tried something like

.react-simple-keyboard :global{
  width: 50% !important;
}

but still not working
How can I do it?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I don't think you are using the CSS modules correctly. The way you do it is like this:

whatever.module.css

.something {
  color: red;
}

some.tsx

import styles from "./whatever.module.css"
<Component className={styles.something}/>

The fact that you are using dashes ("-") makes me think that you don't use this properly, as you can't use dashes in an object property name.

If you did apply the styles correctly, and it still doesn't work, try using this class in the global css file - .simple-keyboard

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