Pārlūkot izejas kodu

fix: improve mobile user experience (#3508)

vanilla_orig
Luca Colonnello 4 gadus atpakaļ
vecāks
revīzija
f28f7ffb6e
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam
1 mainītis faili ar 19 papildinājumiem un 3 dzēšanām
  1. 19
    3
      public/index.html

+ 19
- 3
public/index.html Parādīt failu

107
 
107
 
108
     <!-- FIXME: remove this when we update CRA (fix SW caching) -->
108
     <!-- FIXME: remove this when we update CRA (fix SW caching) -->
109
     <style>
109
     <style>
110
-      body {
110
+      body,
111
+      html {
111
         margin: 0;
112
         margin: 0;
112
         --ui-font: system-ui, BlinkMacSystemFont, -apple-system, Segoe UI,
113
         --ui-font: system-ui, BlinkMacSystemFont, -apple-system, Segoe UI,
113
           Roboto, Helvetica, Arial, sans-serif;
114
           Roboto, Helvetica, Arial, sans-serif;
114
         font-family: var(--ui-font);
115
         font-family: var(--ui-font);
115
         -webkit-text-size-adjust: 100%;
116
         -webkit-text-size-adjust: 100%;
116
 
117
 
117
-        width: 100vw;
118
-        height: 100vh;
118
+        width: 100%;
119
+        height: 100%;
119
       }
120
       }
120
 
121
 
121
       .visually-hidden {
122
       .visually-hidden {
150
       }
151
       }
151
       #root {
152
       #root {
152
         height: 100%;
153
         height: 100%;
154
+        -webkit-touch-callout: none;
155
+        -webkit-user-select: none;
156
+        -khtml-user-select: none;
157
+        -moz-user-select: none;
158
+        -ms-user-select: none;
159
+        user-select: none;
160
+
161
+        @media screen and (min-width: 1200px) {
162
+          -webkit-touch-callout: default;
163
+          -webkit-user-select: auto;
164
+          -khtml-user-select: auto;
165
+          -moz-user-select: auto;
166
+          -ms-user-select: auto;
167
+          user-select: auto;
168
+        }
153
       }
169
       }
154
     </style>
170
     </style>
155
   </head>
171
   </head>

Notiek ielāde…
Atcelt
Saglabāt