Appcelerator hierarchical selector for TSS

174 views Asked by At

How can we set style using hierarchical selector in TSS?

For example in index.xml file I have

<TableView id="myTable">
      <TableViewRow>
          <Label text="Row"></Label>
      </TableViewRow>
</TableView>


For this I want to set Set style to Label inside #myTable
Like in CSS we can do it

#myTable Label{ 
  //style
}

But this is not working in TSS.

So does anyone know how can we set style using an hierarchical selector?

1

There are 1 answers

1
Ray On

TSS isn't CSS, though both are designed to allow setting visual properties. I am almost positive there is no way to hierarchically set a TSS rule. You must apply to the object directly or to the object as a class. So, you could create a class called 'tablelabel' and set it's properties, then apply the class to the label object in the table... But it's a direct assignment not a hierarchical one.