From 81325e2b22b36fda6820641f3ae1066505bc6772 Mon Sep 17 00:00:00 2001 From: thislight Date: Mon, 18 Nov 2024 22:41:11 +0800 Subject: [PATCH] revise user-select property --- src/App.css | 4 ++++ src/profiles/Profile.css | 24 +++++++++++++++++++++--- src/profiles/Profile.tsx | 2 +- src/timelines/TootBottomSheet.tsx | 2 ++ src/timelines/toot.module.css | 11 +++++------ 5 files changed, 33 insertions(+), 10 deletions(-) diff --git a/src/App.css b/src/App.css index c891e53..70ee2fb 100644 --- a/src/App.css +++ b/src/App.css @@ -35,3 +35,7 @@ https://stackoverflow.com/questions/66005655/pwa-ios-child-of-body-not-taking-10 h1 { margin: 0; } + +* { + user-select: none; +} diff --git a/src/profiles/Profile.css b/src/profiles/Profile.css index fa506b7..994a278 100644 --- a/src/profiles/Profile.css +++ b/src/profiles/Profile.css @@ -28,6 +28,10 @@ } word-break: break-all; + + & * { + user-select: text; + } } .acct-grp { @@ -49,6 +53,18 @@ .name-grp { display: flex; flex-flow: column nowrap; + + & * { + user-select: text; + } + + .display-name { + display: block; + } + + .username { + user-select: all; + } } .acct-mark { @@ -57,9 +73,7 @@ margin-right: 0.25em; } - .display-name { - display: block; - } + table.acct-fields { word-break: break-all; @@ -78,6 +92,10 @@ & svg { vertical-align: middle; } + + & * { + user-select: text; + } } .toot-list-toolbar { diff --git a/src/profiles/Profile.tsx b/src/profiles/Profile.tsx index 21ce929..403a045 100644 --- a/src/profiles/Profile.tsx +++ b/src/profiles/Profile.tsx @@ -424,7 +424,7 @@ const Profile: Component = () => { aria-label="Display name" > - {fullUsername()} + {fullUsername()}
diff --git a/src/timelines/TootBottomSheet.tsx b/src/timelines/TootBottomSheet.tsx index e82ce00..6d7992b 100644 --- a/src/timelines/TootBottomSheet.tsx +++ b/src/timelines/TootBottomSheet.tsx @@ -261,6 +261,8 @@ const TootBottomSheet: Component = (props) => { style={{ "scroll-margin-top": "calc(var(--scaffold-topbar-height) + 20px)", + "cursor": "auto", + "user-select": "auto", }} status={toot()!} actionable={!!actSession()} diff --git a/src/timelines/toot.module.css b/src/timelines/toot.module.css index b79f896..4042122 100644 --- a/src/timelines/toot.module.css +++ b/src/timelines/toot.module.css @@ -5,12 +5,7 @@ margin-block: 0; position: relative; contain: content; - - &:not(.expanded) { - user-select: none; - cursor: pointer; - } - + cursor: pointer; &.toot { /* fix composition ordering: I think the css module processor should aware the overriding and behaves, but no */ @@ -100,6 +95,10 @@ margin-right: var(--card-pad, 0); line-height: 1.5; + & * { + user-select: text; + } + & a { color: var(--tutu-color-primary-d); }