Media queries not supporting when passing props in class, with multiple item with same class.
- Dominant language
- JavaScript
- Stars
- 7.1k
- Forks
- 386
- PR merge metrics
- No merged PRs in 30d
Description
__Expected behavior:__
When I create a class function (passing props) , and I use media queries , the media queries should affect all elements that has that class.
__Describe the bug:__
The class only affect the first element the rest dont have the properties that the media queries give.
__Reproduction:__
Heres a codeSanbox with the bug in question.
https://codesandbox.io/s/rendering-emotion-vs-styled-components-vs-jss-forked-hoyd4v?file=/index.js:254-259
__Versions (please complete the following information):__
- jss: 10.6.0
- Browser [e.g. chrome, safari]: codeSandbox(chrome)
- OS [e.g. Windows, macOS]: windows
Contributor guide
Research direction
Start by reproducing the behavior in the linked CodeSandbox, focusing on the example in index.js around lines 254-259 with JSS 10.6.0. Trace how a class function with props and its media query are generated for repeated elements, then verify that the media-query properties apply to every element sharing the class.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100