Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Titanium Alloy - TSS vs. CSS?

I've just started coding with Titanium Alloy. Having previously learned JavaScript, HTML, and CSS through many different resources, I'm a little confused with Titanium's (Appcelerator's) version of style sheets.

What are the differences between Titanium's TSS and normal CSS coding? Are there any good resources to aid in learning TSS from a background with an introductory level CSS knowledge?

Thanks in advance for the help!

like image 744
Stephen Rutstein Avatar asked Apr 10 '26 21:04

Stephen Rutstein


1 Answers

TSS is completely different from CSS. There are some similarities, but it should be quickly forgotten.

For example, CSS does textAlign: center, TSS does something similar, but will throw an error if you copy past it, you need to wrap center in quotes: textAlign: 'center'.

In alloy TSS and the XML files are generated to the "classic" Javascript files. So basically all properties you usually set in a createView method, you can now set in the TSS. Which makes the files a whole lot smaller and completer

For how TSS works I strongly advice you to dive into the documentation of Titanium and look at the "classic" documentation or, if available, the Alloy documentation. For example at a text field: http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TextField

like image 60
Rene Pot Avatar answered Apr 13 '26 12:04

Rene Pot



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!