Merge pull request #48 from iharosi/master
Merge pull request #48 from iharosi/master

minimal-ui added to allow fullscreen on iOS 7.1

file:a/index.html -> file:b/index.html
--- a/index.html
+++ b/index.html
@@ -11,7 +11,7 @@
 
   <meta name="HandheldFriendly" content="True">
   <meta name="MobileOptimized" content="320">
-  <meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0, maximum-scale=1, user-scalable=no">
+  <meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0, maximum-scale=1, user-scalable=no, minimal-ui">
 </head>
 <body>
   <div class="container">

--- a/style/main.css
+++ b/style/main.css
@@ -227,69 +227,69 @@
   height: 106.25px;
   line-height: 116.25px; }
   .tile.tile-position-1-1 {
-    -webkit-transform: translate(0px, 0px);
-    -moz-transform: translate(0px, 0px);
-    transform: translate(0px, 0px); }
+    position: absolute;
+    left: 0px;
+    top: 0px; }
   .tile.tile-position-1-2 {
-    -webkit-transform: translate(0px, 121px);
-    -moz-transform: translate(0px, 121px);
-    transform: translate(0px, 121px); }
+    position: absolute;
+    left: 0px;
+    top: 121px; }
   .tile.tile-position-1-3 {
-    -webkit-transform: translate(0px, 243px);
-    -moz-transform: translate(0px, 243px);
-    transform: translate(0px, 243px); }
+    position: absolute;
+    left: 0px;
+    top: 243px; }
   .tile.tile-position-1-4 {
-    -webkit-transform: translate(0px, 364px);
-    -moz-transform: translate(0px, 364px);
-    transform: translate(0px, 364px); }
+    position: absolute;
+    left: 0px;
+    top: 364px; }
   .tile.tile-position-2-1 {
-    -webkit-transform: translate(121px, 0px);
-    -moz-transform: translate(121px, 0px);
-    transform: translate(121px, 0px); }
+    position: absolute;
+    left: 121px;
+    top: 0px; }
   .tile.tile-position-2-2 {
-    -webkit-transform: translate(121px, 121px);
-    -moz-transform: translate(121px, 121px);
-    transform: translate(121px, 121px); }
+    position: absolute;
+    left: 121px;
+    top: 121px; }
   .tile.tile-position-2-3 {
-    -webkit-transform: translate(121px, 243px);
-    -moz-transform: translate(121px, 243px);
-    transform: translate(121px, 243px); }
+    position: absolute;
+    left: 121px;
+    top: 243px; }
   .tile.tile-position-2-4 {
-    -webkit-transform: translate(121px, 364px);
-    -moz-transform: translate(121px, 364px);
-    transform: translate(121px, 364px); }
+    position: absolute;
+    left: 121px;
+    top: 364px; }
   .tile.tile-position-3-1 {
-    -webkit-transform: translate(243px, 0px);
-    -moz-transform: translate(243px, 0px);
-    transform: translate(243px, 0px); }
+    position: absolute;
+    left: 243px;
+    top: 0px; }
   .tile.tile-position-3-2 {
-    -webkit-transform: translate(243px, 121px);
-    -moz-transform: translate(243px, 121px);
-    transform: translate(243px, 121px); }
+    position: absolute;
+    left: 243px;
+    top: 121px; }
   .tile.tile-position-3-3 {
-    -webkit-transform: translate(243px, 243px);
-    -moz-transform: translate(243px, 243px);
-    transform: translate(243px, 243px); }
+    position: absolute;
+    left: 243px;
+    top: 243px; }
   .tile.tile-position-3-4 {
-    -webkit-transform: translate(243px, 364px);
-    -moz-transform: translate(243px, 364px);
-    transform: translate(243px, 364px); }
+    position: absolute;
+    left: 243px;
+    top: 364px; }
   .tile.tile-position-4-1 {
-    -webkit-transform: translate(364px, 0px);
-    -moz-transform: translate(364px, 0px);
-    transform: translate(364px, 0px); }
+    position: absolute;
+    left: 364px;
+    top: 0px; }
   .tile.tile-position-4-2 {
-    -webkit-transform: translate(364px, 121px);
-    -moz-transform: translate(364px, 121px);
-    transform: translate(364px, 121px); }
+    position: absolute;
+    left: 364px;
+    top: 121px; }
   .tile.tile-position-4-3 {
-    -webkit-transform: translate(364px, 243px);
-    -moz-transform: translate(364px, 243px);
-    transform: translate(364px, 243px); }
+    position: absolute;
+    left: 364px;
+    top: 243px; }
   .tile.tile-position-4-4 {
-    -webkit-transform: translate(364px, 364px);
-    -moz-transform: translate(364px, 364px);
-    transform: translate(364px, 364px); }
+    position: absolute;
+    left: 364px;
+    top: 364px; }
 
 .tile {
   border-radius: 3px;
@@ -297,13 +297,11 @@
   text-align: center;
   font-weight: bold;
   z-index: 10;
-  position: absolute;
   font-size: 55px;
   -webkit-transition: 100ms ease-in-out;
   -moz-transition: 100ms ease-in-out;
-  -webkit-transition-property: -webkit-transform;
-  -moz-transition-property: -moz-transform;
-  transition-property: transform; }
+  -webkit-transition-property: top, left;
+  -moz-transition-property: top, left; }
   .tile.tile-2 {
     background: #eee4da;
     box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0), inset 0 0 0 1px rgba(255, 255, 255, 0); }
@@ -399,8 +397,8 @@
 .tile-new {
   -webkit-animation: appear 200ms ease 100ms;
   -moz-animation: appear 200ms ease 100ms;
-  -webkit-animation-fill-mode: backwards;
-  -moz-animation-fill-mode: backwards; }
+  -webkit-animation-fill-mode: both;
+  -moz-animation-fill-mode: both; }
 
 @-webkit-keyframes pop {
   0% {
@@ -445,8 +443,8 @@
   z-index: 20;
   -webkit-animation: pop 200ms ease 100ms;
   -moz-animation: pop 200ms ease 100ms;
-  -webkit-animation-fill-mode: backwards;
-  -moz-animation-fill-mode: backwards; }
+  -webkit-animation-fill-mode: both;
+  -moz-animation-fill-mode: both; }
 
 .game-intro {
   margin-bottom: 0; }
@@ -564,69 +562,69 @@
     height: 57.5px;
     line-height: 67.5px; }
     .tile.tile-position-1-1 {
-      -webkit-transform: translate(0px, 0px);
-      -moz-transform: translate(0px, 0px);
-      transform: translate(0px, 0px); }
+      position: absolute;
+      left: 0px;
+      top: 0px; }
     .tile.tile-position-1-2 {
-      -webkit-transform: translate(0px, 68px);
-      -moz-transform: translate(0px, 68px);
-      transform: translate(0px, 68px); }
+      position: absolute;
+      left: 0px;
+      top: 68px; }
     .tile.tile-position-1-3 {
-      -webkit-transform: translate(0px, 135px);
-      -moz-transform: translate(0px, 135px);
-      transform: translate(0px, 135px); }
+      position: absolute;
+      left: 0px;
+      top: 135px; }
     .tile.tile-position-1-4 {
-      -webkit-transform: translate(0px, 203px);
-      -moz-transform: translate(0px, 203px);
-      transform: translate(0px, 203px); }
+      position: absolute;
+      left: 0px;
+      top: 203px; }
     .tile.tile-position-2-1 {
-      -webkit-transform: translate(68px, 0px);
-      -moz-transform: translate(68px, 0px);
-      transform: translate(68px, 0px); }
+      position: absolute;
+      left: 68px;
+      top: 0px; }
     .tile.tile-position-2-2 {
-      -webkit-transform: translate(68px, 68px);
-      -moz-transform: translate(68px, 68px);
-      transform: translate(68px, 68px); }
+      position: absolute;
+      left: 68px;
+      top: 68px; }
     .tile.tile-position-2-3 {
-      -webkit-transform: translate(68px, 135px);
-      -moz-transform: translate(68px, 135px);
-      transform: translate(68px, 135px); }
+      position: absolute;
+      left: 68px;
+      top: 135px; }
     .tile.tile-position-2-4 {
-      -webkit-transform: translate(68px, 203px);
-      -moz-transform: translate(68px, 203px);
-      transform: translate(68px, 203px); }
+      position: absolute;
+      left: 68px;
+      top: 203px; }
     .tile.tile-position-3-1 {
-      -webkit-transform: translate(135px, 0px);
-      -moz-transform: translate(135px, 0px);
-      transform: translate(135px, 0px); }
+      position: absolute;
+      left: 135px;
+      top: 0px; }
     .tile.tile-position-3-2 {
-      -webkit-transform: translate(135px, 68px);
-      -moz-transform: translate(135px, 68px);
-      transform: translate(135px, 68px); }
+      position: absolute;
+      left: 135px;
+      top: 68px; }
     .tile.tile-position-3-3 {
-      -webkit-transform: translate(135px, 135px);
-      -moz-transform: translate(135px, 135px);
-      transform: translate(135px, 135px); }
+      position: absolute;
+      left: 135px;
+      top: 135px; }
     .tile.tile-position-3-4 {
-      -webkit-transform: translate(135px, 203px);
-      -moz-transform: translate(135px, 203px);
-      transform: translate(135px, 203px); }
+      position: absolute;
+      left: 135px;
+      top: 203px; }
     .tile.tile-position-4-1 {
-      -webkit-transform: translate(203px, 0px);
-      -moz-transform: translate(203px, 0px);
-      transform: translate(203px, 0px); }
+      position: absolute;
+      left: 203px;
+      top: 0px; }
     .tile.tile-position-4-2 {
-      -webkit-transform: translate(203px, 68px);
-      -moz-transform: translate(203px, 68px);
-      transform: translate(203px, 68px); }
+      position: absolute;
+      left: 203px;
+      top: 68px; }
     .tile.tile-position-4-3 {
-      -webkit-transform: translate(203px, 135px);
-      -moz-transform: translate(203px, 135px);
-      transform: translate(203px, 135px); }
+      position: absolute;
+      left: 203px;
+      top: 135px; }
     .tile.tile-position-4-4 {
-      -webkit-transform: translate(203px, 203px);
-      -moz-transform: translate(203px, 203px);
-      transform: translate(203px, 203px); }
+      position: absolute;
+      left: 203px;
+      top: 203px; }
 
   .game-container {
     margin-top: 20px; }

--- a/style/main.scss
+++ b/style/main.scss
@@ -282,11 +282,9 @@
     @for $x from 1 through $grid-row-cells {
       @for $y from 1 through $grid-row-cells {
         &.tile-position-#{$x}-#{$y} {
-          $xPos: round(($tile-size + $grid-spacing) * ($x - 1));
-          $yPos: round(($tile-size + $grid-spacing) * ($y - 1));
-          -webkit-transform: translate($xPos, $yPos);
-          -moz-transform: translate($xPos, $yPos);
-          transform: translate($xPos, $yPos);
+          position: absolute;
+          left: round(($tile-size + $grid-spacing) * ($x - 1));
+          top: round(($tile-size + $grid-spacing) * ($y - 1));
         }
       }
     }
@@ -303,14 +301,11 @@
   text-align: center;
   font-weight: bold;
   z-index: 10;
-  position: absolute;
 
   font-size: 55px;
 
   @include transition($transition-speed ease-in-out);
-  -webkit-transition-property: -webkit-transform;
-  -moz-transition-property: -moz-transform;
-  transition-property: transform;
+  @include transition-property(top, left);
 
   $base: 2;
   $exponent: 1;
@@ -399,7 +394,7 @@
 
 .tile-new {
   @include animation(appear 200ms ease $transition-speed);
-  @include animation-fill-mode(backwards);
+  @include animation-fill-mode(both);
 }
 
 @include keyframes(pop) {
@@ -422,7 +417,7 @@
 .tile-merged {
   z-index: 20;
   @include animation(pop 200ms ease $transition-speed);
-  @include animation-fill-mode(backwards);
+  @include animation-fill-mode(both);
 }
 
 .game-intro {

comments