problem
app.tss files are not being applied to views/controllers that don't have controller-specific styles. For example:
index.xml
<Alloy>
<Window class="container">
<Label id="label">Hello, World</Label>
</Window>
</Alloy>
app.tss
".container": {
backgroundColor:"#888"
}
"Label": {
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
color: "#f00"
}
The above will not apply the app.tss styles to the appropriate components in the index.xml file.
workaround
Creating a blank TSS file "index.tss" will apply the global style.
Resolved in 1.1.1 and 1.2.0. Added test app for this case: https://github.com/appcelerator/alloy/tree/master/test/apps/basics/global_style
popup.xml
[~ptquang86] this should be resolved in Alloy 1.1.2 as a result of ALOY-628
Thank you Tony. Waiting for Alloy 1.1.2 :)
test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-625 When the app is run, the text represented in the app will indicate how the app should appear for the functional test to pass.
[~ptquang86] if you want to test it early, you can try out the alpha now:
Working as expected using the testapp https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-625 Tested on: Device: Samsung Galaxy Note, Android version: 2.3.6 Device : iPad 2, iOS version: 5.1 Alloy verison: 1.1.2-alpha SDK: 3.1.1.v20130430164508 CLI version : 3.1.0 OS : MAC OSX 10.7.5 Appcelerator Studio, build: 3.1.0.201304281117 XCode : 4.5.1
Verified / fixed as also ALOY-625 Rechecked with environment: Titanium SDK 3.1.2.v20130619101604 Alloy 1.1.3 Appcelerator Studio 3.1.1.201306131423 Node 0.8.22 Closing.