[AC-1862] [Alloy] app.tss will override non-global styles
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-06-26T18:03:59.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy |
Labels | defect, ios |
Reporter | Mike |
Assignee | Mauro Parra-Miranda |
Created | 2013-04-25T16:31:10.000+0000 |
Updated | 2016-03-08T07:40:46.000+0000 |
Description
According to docs "Global Styles. You can create a global style file, called app.tss, which applies all styles defined inside it to all views, but does not override the non-global styles or property attributes in the markup."
Here's my Proof of concept
*index.xml*
<Alloy>
<Window id="index" layout="vertical">
<View id="topPanel" class="topPanel" layout="horizontal" />
</Window>
</Alloy>
*app.tss*
".x": {},
".y": {},
".z": {},
".topPanel": {
height: 150,
backgroundColor: 'yellow'
}
*index.tss*
".a": {},
".b": {},
".topPanel": {
height: 150,
backgroundColor: 'green'
}
This code above should show topPanel green right? Since "local" index.tss overrides global app.tss. Well, it doesn't. It shows yellow box.
However if I change index.tss to that:
*index.tss*
".a": {},
".b": {},
".c": {},
".d": {},
".topPanel": {
height: 150,
backgroundColor: 'green'
}
Now my background is green. I assume it has something to do with .topPanel being "lower/more far" in the JSON list.
Thanks
Cannot reproduce with Ti SDK 3.1 GA or 3.1.1 GA, Alloy 1.1.3. Green is shown as expected.