Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1860] Element style does not overwrite on global style with same name

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-09-17T07:12:45.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy
LabelsAlloy, Style, TTS
ReporterNavid Ghahramani
AssigneeShak Hossain
Created2013-08-07T16:10:58.000+0000
Updated2016-03-08T07:40:46.000+0000

Description

This is test case: *app.tss*
".price": {
 color: "white",
 backgroundColor: "black"
}
*myclass.tss*
".price":{
 color: "black",
 backgroundColor: "white"
}
*myclass.xml*
<Alloy>
 <Label text="Test" class="price">
</Alloy>
if you test it, you can see the label color is same app.tss style not myclass.tss

Comments

  1. Mostafizur Rahman 2013-09-17

    Hello Navid Ghahramani, I checked your test code. I can't reproduce this bug. Please see my test code Index.xml
       <Alloy>
       	<Window title="Sections & Rows">
       		 <Require src="myclass"></Require>
       	</Window>
       </Alloy>
       
    index.tss
        "Window":{
        	backgroundColor: 'red'
        }
       
       ".price": {
        color: "#000",
        backgroundColor: "black"
        }
       
       
    myclass.xml
       <Alloy>
        <Label text="color Test" class="price">
       </Alloy>
       
    myclass.tss
       
       ".price": {
        color: "#ff0000",
        backgroundColor: "black"
        }
       
    Test Environment: Alloy Version: 1.2.0 OS: OS X 10.8.4 Android Version: 2.3.3

JSON Source