In our current setup we want to add certain attributes to all properties inside an object (a 'group').
Why do I need this?
Let's assume we have a switch component...
By default, I want all my properties to be not outputted as css variables, unless they should be globally switched for dark/light mode.
The component itself would be outputted to a JS object, that can be applied in a css-in-jss like manner.
The idea is to register a group transform that preprocesses the complete dictionary and adds attributes.
Concretely this could mean something like this:
Group Property Transforms
In our current setup we want to add certain attributes to all properties inside an object (a 'group').
Why do I need this?
Let's assume we have a switch component... By default, I want all my properties to be not outputted as css variables, unless they should be globally switched for dark/light mode. The component itself would be outputted to a JS object, that can be applied in a css-in-jss like manner.
Dictionary
Results
This outputs (via multiple formatters):
Possible implementation
The idea is to register a group transform that preprocesses the complete dictionary and adds attributes. Concretely this could mean something like this:
I would have a working proof of concept in a branch if interested.