Hi,
I started the implementation of my application (last step was design) today and I’m facing some problems. First of all, let me briefly explain the look and feel I would like to have.
Given that the interface is complex, I’m starting with the header, which is quite customized:
- gradient background
- higher header (70px)
- centered logo of our company
- left navigation (with custom color)
- sometimes right navigation (depending of the view)
[Step 1] I set my custom navigation icon color with the following property (.bar-header .ion-navicon class):
color: #f59549;
[Step 2] I solved the first and second point by overwriting the .bar-header class with the following properties:
background: linear-gradient(to bottom, #fefefe 0%, #dddddd 100%)!important;
border-color: #efefef !important;
height: 70px!important;
[Step 3] Then, I put the logo between the recommanded “<h1 class="title">...</h1>
” but it’s weird to have an image in a h1 tag, isn’t it?
[Step 4] The logo was cropped at the bottom because the h1’parent was shorter. So I overwrote the .bar .title class with the following property:
height: 100%!important;
Alright, it looks good on my browser. Let’s test on my Android device (LG G3 running Android 4.4.2).
[Step 5] Damn! The logo is zoomed (+/- x3.386) and pixelated… So I set it the following properties:
max-width: 100%;
max-height: 100%;
I restarted the app and now the proportion is good. But, it seems that every components are zoomed, upscalled:
- my LG G3 has a 1440*2560px screen
- the logo’ size is 404*56px
- the header’ size is 70px
If I take a screenshot on my phone, the logo’ size is 1222*169px (x3.02475248) and the header’ size is 236px (x3.37142857, almost same as the logo before the max-height/width property).
[Questions]
So, my questions are really simple:
- Did I do anything wrong? (logo in the h1, gradient…)
- I assume that phone upscaling is normal, but how can I guarantee the look and feel of my app across devices?
- How to correct the size of my logo/header on my device? (= how to set the upscaling at 2x instead of 3,…x?)
[Ressources]
Codepen exemple: http://codepen.io/anon/pen/VYWwba
Screenshot of the result on my device: http://i.imgur.com/oCAVqd9.png (full res)
I hope you will find this understandable…
Thanks in advance,
Regards