Theme as data
(Created page with "MDriven Turnkey now has added support for keeping your theme and css as data within your app. To have the CSS rules as data within the app rather than as a file on the server...")
 
No edit summary
Line 2: Line 2:


To have the CSS rules as data within the app rather than as a file on the server opens up other possibilities to react to other data and possibly change between multiple sets of css rules (themes) in runtime.
To have the CSS rules as data within the app rather than as a file on the server opens up other possibilities to react to other data and possibly change between multiple sets of css rules (themes) in runtime.
The pattern for Turnkey to discover for applying data as CSS is this:
SysSingleton.oclsingleton.PickedThemeData , and the object found must ha Name:string and DerivedCSS:string
An example model to both add this model section plus a UI to set CSS theming variables is found here: [[Model Examples|Theme Builder]]

Revision as of 08:38, 24 June 2020

MDriven Turnkey now has added support for keeping your theme and css as data within your app.

To have the CSS rules as data within the app rather than as a file on the server opens up other possibilities to react to other data and possibly change between multiple sets of css rules (themes) in runtime.

The pattern for Turnkey to discover for applying data as CSS is this:

SysSingleton.oclsingleton.PickedThemeData , and the object found must ha Name:string and DerivedCSS:string

An example model to both add this model section plus a UI to set CSS theming variables is found here: Theme Builder

This page was edited 97 days ago on 02/10/2024. What links here