[ALOY-88] Alloy style files to specify platform and form factor specific sections
GitHub Issue | n/a |
---|---|
Type | Sub-task |
Priority | High |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2012-07-23T06:34:05.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | XML |
Labels | n/a |
Reporter | Tony Lukasavage |
Assignee | Unknown |
Created | 2012-07-16T09:06:47.000+0000 |
Updated | 2018-03-07T22:26:13.000+0000 |
Description
There's a couple ways we could do this:
A custom "selector"
**"#myView[platform=ios]": { "backgroundColor": "#a00" }
A syntax by which multiple items can be grouped under one "selector"
**"[platform=android,size=tablet]": {
"#myView": { "backgroundColor": "#300" },
"#anotherView: { "height": 200 }
}
I'm open to other suggestions that could be fit into the current JSON derivative syntax we are using.
To makes use of media queries we can only make parse and prepare the query based on information we get back from the device. I'm not sure with Android we can get if it's a tablet or not. I think using a max/min width and pixel density are all values we can get back from querying device capabilities.
Tons of detail available in the final comments in this thread: https://groups.google.com/forum/?fromgroups#!starred/appc-ti-alloy/xgsnEdhfIDo