There are 2 different angles to styling:
- The overall theme and look of your application
- A way to convey information from data via special styling
The overall theme and look of your application
To change backgrounds, fonts, font color, and sizes; all are fully configurable through CSS, but an even cleaner way to apply your theme consistently is to use the predefined CSS variables that exist in the MDrivenTurnkey StyleSystem. You can easily give them values already in the model and be sure that they will be applied throughout the application.
Watch this video for an overview:
A way to convey information from data via special styling
Sometimes you would bring the user's attention to something specific - like a green "all is super great" label. To instruct the label to turn green, we need to have a style with a green background. Once we have such a style, we can reference that style name in the styling expression on the ViewModelColumn for the label.
We may want to have rules for when and what style to apply:
self.ThingsAreSuperGreat->casetruefalse(selfVM.Styles.TheGreenStyle,selfVM.Styles.TheRedStyle)
Styles like these can be maintained in the model as well; we call them StylesInModel
