0
const useStyles = makeStyles({
  paper: {
    color: "var(--text-color) !important",
  },
})

The CSS variable var(--text-color) changes throughout the APP based on a toggle. But the component that uses this useStyles does not change with it.

What is wrong here?

EDITED:

This fixed it:

          <Autocomplete disablePortal />

Now, can someone explain why?

1 Answers1

0

This fixed it:

          <Autocomplete disablePortal />
General Grievance
  • 4,259
  • 21
  • 28
  • 43
  • Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - [From Review](/review/low-quality-posts/30755751) – camille Jan 06 '22 at 20:24
  • actually, that is the complete solution. Setting `disablePortal` is it – Big Cat Public Safety Act Jan 06 '22 at 20:44
  • 1
    If you want people to answer with why this happens, it would probably be better to move this line to the question, so the question itself can be "here's the problem, here's what fixed it, can the answers explain what's happening and why?" – camille Jan 06 '22 at 21:26