Skip to content

Instantly share code, notes, and snippets.

@tonylukasavage
Created July 16, 2013 14:49
Show Gist options
  • Save tonylukasavage/6009423 to your computer and use it in GitHub Desktop.
Save tonylukasavage/6009423 to your computer and use it in GitHub Desktop.
TSS reset for Alloy/Titanium
'Label[platform=android]': {
color: '#000' // all platforms except Android default to black
}
'Window': {
backgroundColor: '#fff' // white background instead of default transparent
}
'Window[platform=android]': {
modal: false // make android windows all heavyweight
}
'TextField': {
borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED // common default style
}
@FokkeZB
Copy link

FokkeZB commented Jul 17, 2013

@skypanter, I created a JIRA ticket with an alternative solution for this: https://jira.appcelerator.org/browse/TC-2621. If this gets adopted, the TSS reset could set view backgroundColors to inherit by default.

I just think the reset TSS shouldn't break people's apps, but if the reset TSS would only be inserted into the app.tss of newly created Alloy projects that would be less of an issue of course.

@FokkeZB
Copy link

FokkeZB commented Jul 17, 2013

Another one I'd add:

'ImageView[platform=ios]': {
    preventDefaultImage: true // never show ugly image while loading remote
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment