Disable touch selection and tap highlight on D-pad and all game elements
This commit is contained in:
@@ -35,6 +35,15 @@
|
|||||||
/* ─── RESET ──────────────────────────────────────────────── */
|
/* ─── RESET ──────────────────────────────────────────────── */
|
||||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
|
||||||
|
/* Prevent text selection and touch callouts everywhere in the game */
|
||||||
|
html, body, #app {
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
-webkit-touch-callout: none;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
/* ─── BODY ───────────────────────────────────────────────── */
|
/* ─── BODY ───────────────────────────────────────────────── */
|
||||||
html, body {
|
html, body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -222,6 +231,8 @@ html, body {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
-webkit-tap-highlight-color: transparent;
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
user-select: none;
|
||||||
touch-action: none;
|
touch-action: none;
|
||||||
transition: background .08s;
|
transition: background .08s;
|
||||||
}
|
}
|
||||||
@@ -285,6 +296,8 @@ html, body {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
box-shadow: 0 4px 0 rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.3);
|
box-shadow: 0 4px 0 rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.3);
|
||||||
-webkit-tap-highlight-color: transparent;
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
user-select: none;
|
||||||
touch-action: none;
|
touch-action: none;
|
||||||
transition: transform .06s, box-shadow .06s;
|
transition: transform .06s, box-shadow .06s;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user