Description
ZipTi currently provides no means of specifying complex types in CSS, therefore there is no way of specifying many common UI properties from markup. This will cause some major confusion, not to mention that it is contrary to the point of abstracting styling through CSS. This effects some of our most used properties, like
font
.
Example
<html>
<body>
<div id="label1" data-ti-api="Label" style="font:{fontSize:30}"></div>
</body>
</html>
Will cause the following cryptic error to appear, as a result of the CSS-compliant grammar and parser used for parsing:
Uncaught SyntaxError: Expected "+", "-", angle, frequency, function, hash, identifier,
length, number, percentage, string, time, uri or whitespace but "{" found.
I think the way to handle this is to look at the complex properties that make up a majority of the Ti.UI namespace like Point, Font, and Array. For Array only simple types like strings or numbers should be supported. They map to CSS style using the shorthand syntax for example: -ti-font: 'Helvetica' '12px' 'italic' 'bold'; or -ti-fontFamily: 'Helvetica'; -ti-fontSize: '12px'; -ti-fontStyle: 'italic'; -ti-fontWeight: 'bold';
Should we create a ticket/story for documenting all of these cases? This likely will be a difficult task, especially considering that some won't have a direct correlation in CSS.
We have swicthed from CSS styling to JSON, so this is no longer an issue.