Suppress mobile long-press selection and tap highlight.
Treat the app as a game surface: no tap-flash, and a long-press on a card or button no longer starts a text selection or pops an image callout. Form inputs and the room code opt back into selection so typing and copying still work.
This commit is contained in:
@@ -53,6 +53,8 @@
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
/* No grey/blue flash when tapping anything on mobile. */
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
html,
|
||||
@@ -67,6 +69,12 @@ body {
|
||||
background-color: var(--felt-900);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-rendering: optimizeLegibility;
|
||||
/* This is a game surface, not a document — a long-press on a card or button
|
||||
shouldn't start a text selection or pop an image callout. Inputs and the
|
||||
room code opt back in below. */
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-touch-callout: none;
|
||||
/* A warm overhead lamp, a soft felt weave, fine grain, and a dark rim. */
|
||||
background-image:
|
||||
radial-gradient(ellipse 90% 60% at 50% -8%, rgba(255, 214, 138, 0.16), transparent 60%),
|
||||
@@ -79,6 +87,21 @@ body {
|
||||
background-attachment: fixed;
|
||||
}
|
||||
|
||||
/* Text you legitimately interact with opts back into selection: form fields so
|
||||
typing/editing works, and the room code so it can be copied to share. */
|
||||
input,
|
||||
textarea,
|
||||
[contenteditable] {
|
||||
-webkit-user-select: text;
|
||||
user-select: text;
|
||||
-webkit-touch-callout: default;
|
||||
}
|
||||
|
||||
.topbar-code {
|
||||
-webkit-user-select: all;
|
||||
user-select: all;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3 {
|
||||
|
||||
Reference in New Issue
Block a user