cssinjs / cssinjs/jss

I am stuck with "backgroundColor" [jss-extend]

Open
#1,534 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.1k
Forks
386
PR merge metrics
No merged PRs in 30d

Description

```
const useDrustStyles = makeStyles((theme) => ({
buttonColor: {
backgroundColor: 'red',
color: 'blue',
'&:hover': {
'background-color': 'blue',
},
},
button: {
extend: 'buttonColor',
fontSize: '20px'
},
}));
```

I coded as above and stucked with an error.

For buttonColor class the background-color and color properties work fine.
But for the button class only the color property works fine, I checked the css and recognized that `jss-extend` generates css property `backgroundColor` not `background-color`. The same is true for all other hyphen properties.

The pseudo `'&:hover'` is not recognized at the pesudo element. How can I use pseudo elements in `jss-extend`?

How can I solve this problem?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.