I'm making an app with Xilem, which includes some custom styling of interactive widgets, but this seems very limited at the moment. Xilem has some built-in styling that uses PropertyStacks to change the styling of widgets in response to state changes, but as for custom styling, from what I can tell, you can only apply custom styling globally, by setting a custom DefaultProperties.
I want to apply custom styling to only certain widgets, and I can see a few possible paths to this:
- Allow setting custom classes on specific widgets. You could then filter for these classes in the selectors in the global
DefaultProperties.
- Allow directly setting
PropertyStacks on specific widgets.
- Add special-case methods to the widget types for each individual custom styling use-case.
Another thing to note is that one of the things I want to do is style a container FlexRow based on the state of a child TextInput. This is a bit different than styling a widget just based on its own state, so I'm not sure how easily the above options could be generalized to this use case.
I'm making an app with Xilem, which includes some custom styling of interactive widgets, but this seems very limited at the moment. Xilem has some built-in styling that uses
PropertyStacks to change the styling of widgets in response to state changes, but as for custom styling, from what I can tell, you can only apply custom styling globally, by setting a customDefaultProperties.I want to apply custom styling to only certain widgets, and I can see a few possible paths to this:
DefaultProperties.PropertyStacks on specific widgets.Another thing to note is that one of the things I want to do is style a container
FlexRowbased on the state of a childTextInput. This is a bit different than styling a widget just based on its own state, so I'm not sure how easily the above options could be generalized to this use case.