[ALOY-756] Alloy dynamic styling: access global app raw styles
|Affected Version/s||Alloy 1.2.0|
|Labels||alloy, app.tss, styling|
DescriptionIn the new dynamic styling for alloy I miss the possibility to access global styles (those defined at app.tss) The idea is to have access to raw styles defined at app.tss in the same way as controllers tss files. For example, to access index raw styles we can do
Which returns a sorted array of all styles defined at index.tss plus those styles inherited from app.tss and themes (if used) The idea would be to have access also to app styles doing something like:require('alloy/styles/index');
Accessing global styles can be useful to create new classes from the existing ones, but not for a specific component in a controller, but for generic reusable styles. Also, if in future is possible to modify the raw styles array so it affects to all new alloy controllers created, modifying global styles makes much more sense than modifying specific controllers styles. Discussion about this and some samples can be found at http://developer.appcelerator.com/question/155135/alloy-dynamic-styling-access-app-raw-style-and-edit-stylesrequire('alloy/styles/app');
- Paul Hamilton 2014-07-01 I am interested in doing this as well. Any update? Being able to change the theme dynamically based on user settings is important to me.