cssinjs/jss
Vedi su GitHubcreateUseStyles + @media + Adapting based on props: not updating correctly
Open
#1327 aperta il 7 apr 2020
bughelp wanted
Metriche repository
- Star
- (7000 star)
- Metriche merge PR
- (Nessuna PR mergiata in 30 g)
Descrizione
Expected behavior: When a property is changed, styles that are inside a @media selector are not being re-generated.
Describe the bug: When a property is changed, all styles that are properties-dependent should be re-generated and re-applied to the component.
Steps:
- "Swap color" button loads with background red and border/text-shadow blue
- Click on the "Swap color" button
- Background is changed to "blue" ✅
- Text-shadow is changed to "red" ✅
- Border is kept "blue" ❌
Codesandbox link: https://codesandbox.io/s/createusestyles-media-vf5zs
Versions (please complete the following information):
- react-jss: 10.1.1
- Browser [e.g. chrome, safari]: chrome (but all)
- OS [e.g. Windows, macOS]: macOs (but all) Feel free to add any additional versions which you may think are relevant to the bug.