Nested function style with prop not working as intended
- Dominant language
- JavaScript
- Stars
- 7.1k
- Forks
- 386
- PR merge metrics
- No merged PRs in 30d
Description
__Expected behavior:__
Nested function style should apply props value to the rule, but it has no effect.
__Describe the bug:__
The props in the following function style have no effect on the rules:
```
wrapper: {
"& h1": p => ({
fontSize: p.size,
weight: 900
})
}
```
__Codesandbox link:__
[codesandbox.io](https://codesandbox.io/s/react-jss-playground-wlkbq?file=/index.js)
__Versions (please complete the following information):__
- jss: 10.0.0-alpha
- Browser [e.g. chrome, safari]: chrome
- OS [e.g. Windows, macOS]: Windows
Contributor guide
Research direction
Start with the linked CodeSandbox reproduction and the nested function style shown in the issue, using JSS 10.0.0-alpha. Trace how the props value is passed to the nested rule and verify the reported h1 properties take effect; done means the reproduction applies the prop-derived rule as expected.
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