-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Note
Comma-separated selectors should be left as is, because otherwise we would have to split up the CSS properties, resulting in duplicated code:
.foo:active, .bar:active { color: 'green' }{
foo: {
'&:active': { color: 'green' },
},
bar: {
'&:active': { color: 'green' }, // now foo:active and bar:active no longer share a single source of truth for this...
}
}Theoretically we could extract variables in cases like this, but right now the CSS-to-JSS transform is only designed to modify text within the selection (which is expected to be inside the braces of some const styles = { ... })
Basic Testcase
Input
.foo {}
.foo.bar {}Expected Output
{
bar: {},
foo: {
'&$bar': {},
},
}Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request