Skip to content

Commit

Permalink
Changed CSS to use a fixed font size. This solves a problem on Androi…
Browse files Browse the repository at this point in the history
…d where the font becomes very small when opening the keyboard.
  • Loading branch information
Mikael Kindborg committed Feb 16, 2016
1 parent 174c423 commit 54ee599
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
3 changes: 2 additions & 1 deletion www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no,
initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="-1" />

<script src="js/hyper-os.js"></script>
<script src="js/hyper-viewport.js"></script>
<!--<script src="js/hyper-viewport.js"></script>-->

<title>Evothings Viewer</title>

Expand Down
19 changes: 16 additions & 3 deletions www/ui/css/evothings-app.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,25 @@ html, body {
user-select: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}

body {
margin: 0 0.9em 0 0.9em;
font-size: 150%;
font-size: 7.5vw;
/* Replaced relative units with pixels. */
/*margin: 0 0.9em 0 0.9em;*/
margin: 0 20px 0 20px;
/*font-size: 150%;
font-size: 7.5vw;*/
font-size: 28px;
}

/* Large displays */
@media (min-width: 600px) {
body { font-size: 40px; }
}

html {
box-sizing: border-box;
}

*, *:before, *:after {
box-sizing: inherit;
}
Expand Down Expand Up @@ -770,8 +780,11 @@ input.btn-group.black:checked + label {
background-color: #000000;
}

/*
This CSS breaks the app when keyboard is shown on Android.
@media screen and (orientation: landscape) and (-webkit-min-device-pixel-ratio : 2),
screen and (orientation: landscape) and (min--moz-device-pixel-ratio: 2),
screen and (orientation: landscape) and (min-device-pixel-ratio : 2) {
body { font-size: 4.5vw; }
}
*/

0 comments on commit 54ee599

Please sign in to comment.