Titanium JIRA Archive
Alloy (ALOY)

[ALOY-756] Alloy dynamic styling: access global app raw styles

GitHub Issuen/a
TypeNew Feature
Affected Version/sAlloy 1.2.0
Fix Version/sn/a
Labelsalloy, app.tss, styling
ReporterDaniel Sefton


In 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:
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-styles


  1. 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.

JSON Source