style: Disable text selection globally with selective text input exceptions

This commit is contained in:
lizhixuan 2025-02-18 15:49:20 +08:00 committed by 亢奋猫
parent f21bf3d860
commit d35f15574e

View File

@ -70,6 +70,13 @@
--list-item-border-radius: 16px;
}
body {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
body[theme-mode='light'] {
--color-white: #ffffff;
--color-white-soft: #f2f2f2;
@ -160,6 +167,19 @@ body {
transition: background-color 0.3s linear;
}
input,
textarea,
[contenteditable='true'],
.markdown,
.selectable,
pre,
code {
-webkit-user-select: text !important;
-moz-user-select: text !important;
-ms-user-select: text !important;
user-select: text !important;
}
a {
-webkit-user-drag: none;
}