cssinjs / cssinjs/jss

[jss-extend][jss-compose] support array of rule names

Open
#656 5 comments 0 reactions 0 assignees View on GitHub
complexity:moderate feature request plugin
Dominant language
JavaScript
Stars
7.1k
Forks
386
PR merge metrics
No merged PRs in 30d

Description

It looks like a single string is accepted to pass an "existing" rule, but what if more than one has to be extended?

Example:
```
cellMinWidth: {
minWidth: 50,
},
blue: {
backgroundColor: 'blue',
},
serviceTable: {
'& th': {
verticalAlign: 'middle',
textAlign: 'center',
padding: 0,
extend: ['cellMinWidth', 'blue'], //not valid
},
'& td': {
verticalAlign: 'top',
textAlign: 'center',
padding: 0,
extend: ['cellMinWidth', 'blue'], //not valid
},
},
```

`jss-compose` doesn't seem to fit too:
```
cellMinWidth: {
minWidth: 50,
},
blue: {
backgroundColor: 'blue',
},
serviceTable: {
'& th': {
verticalAlign: 'middle',
textAlign: 'center',
padding: 0,
composes: ['$cellMinWidth', '$blue'], //neither is applied
},
'& td': {
verticalAlign: 'top',
textAlign: 'center',
padding: 0,
composes: ['$cellMinWidth', '$blue'], //neither is applied
},
},
```

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.