14 Mar 2012 2:58 PM #1
Answered: When to use CSS vs. Profiles and Device Info
I am looking for guidance on what types of things I would consider using CSS/SASS/Compass for versus what types of things I would consider using Profiles and specific device information for.
To further elaborate on my question I will provide a simplistic example that I think will represent what I am trying to ask about.
Let's say I am considering a tablet layout (ipad/galaxy) versus a handheld layout(iphone/etc). I will refer to ipad vs iphone just from now on just for ease of writing. On the ipad I may have a series of actions, potentially laid out as a selection list or toolbar oriented vertically on the left side of the screen with more content on the right side. On the iphone I may decide to make that list of actions into a toolbar with no text, just icons and put it towards the bottom of the screen.
Alternatively, on the ipad the action list and content that can be acted upon may co-exist on the same screen, but with the iphone I may choose to have on screen which shows me the actions and another which shows the content.
I've poked around and played with some stuff. I think I have answered my own question but would like to run it through here to make sure I'm off on the right path.
It seems that if I want to do something as advanced as taking a selection list which may have an icon and text oriented vertically on the ipad and turn it into a button toolbar containing only icons which are oriented horizontally on the iphone that I should plan to use Profiles based on which devices I am on.
However, if I was doing something less complicated, such as changing the size of the icons, but leaving the rest the same I would consider using CSS/SASS instead.
I guess my uncertainty probably comes from my incomplete understanding of the true power of CSS/SASS/Compass, so please pardon my ignorance. It seems that if I truly understood the complete abilities of the CSS/SASS/Compass combination then I would probably be certain about the answer to my question.
EDIT: I guess one final thing I would add is this... Even if the answer might be both, or it depends, I would welcome any comments on best practices around making this decision.
The different layout will be dealt with different UI classes and different profiles.
15 Mar 2012 5:03 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
The different layout will be dealt with different UI classes and different profiles.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.