Thursday, February 26, 2015

Cordova/PhoneGap: prevent screen rotation

Fix the screen side of your app, preventing screen rotation.
Edit the config.xml file, the orientation preference tag in one of these ways:

<preference name="orientation" value="portrait" />

<preference name="orientation" value="landscape" />



Bye...

Monday, February 9, 2015

Font-size property dynamically proportioned to the browser window size

It's called viewport. It's the same to say browser window size.
We can assign to the font-size property a value expressed in percentage.
For example if the viewport width is 50 cm, assinging a font-size of 1vw matches to 0.5 cm.
So we give it simply:
a {
    font-size: 1vw;
}

Others use of dinamical font-size use should be:
- the vh: viewport height - for example: font-size:1vh;
- the vmin: the smaller between vw or vh - for example: font-size:1vmin;
- the vmax: the larger between vw or vh - for example: font-size:1vmax;

Bye...