This is a standard for theming of components. Developers and especially publishers of components should use it to unify their theming API across all components.
Currently a number of UI libraries are using different approaches. Some of them are very opinionated and bad by design, others just don't have the desired flexibility.
We can differentiate 3 approaches:
- Traditional CSS class names.
- Generated CSS class names.
- Inline Styles.
In order to allow component authors to use any of this approaches, we need to define a Theme Interface.
A Component author needs to differentiate System Styles from Theme Styles. More styles in a Theme means more flexibility for the user. System styles should be used for parts of components which can not or should not be customizable.
A Theme should define:
- Font
- Colors
- Images
- Text direction
- Shadows
- Rounded Corners
- Animations
- Margins
- Paddings
When components logic uses some Theme property to modify it's behaviour, it should be a Theme Option.
This is an early stage proposal. Feel free to create issues and discribe use cases. Also feel free to make the wording better.