-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.css
78 lines (78 loc) · 2.95 KB
/
theme.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/* Reply area */
.ChatV2Message-container .ChatMessageQuickActionsWrapper-container {
z-index: 0;
}
.ChatV2Message-container .QuickActionBar-action-wrapper:is([data-name="reply"],[data-name="reply-remove"]) {
position: absolute;
visibility: hidden;
transform: translateY(calc(200vh + 18px));
/* Moves the original reply button offscreen. It's the cleanest way to remove the tooltip with just css. */
}
.ChatV2Message-container .QuickActionBar-action-wrapper:is([data-name="reply"],[data-name="reply-remove"])::after {
content: '';
visibility: visible;
position: absolute;
inset: -200vh -200px 0 -100vw;
/* This line above might cause performance issues. I'm not sure what's the best way to cover the entire message without making some elements static.
-200vh is 2 vertical screens worth of text, which also undoes the transformation. -100vw is 1 horizontal screen. */
z-index: 0;
}
/* Messages */
.ChatV2Message-content-wrapper {
user-select: none;
/* Makes the text not selectible. It was only possible to select while holding shift anyways, and that interfered with the new thread popup. */
}
.ChatV2MessageContents-container {
z-index: 1;
pointer-events: none;
/* Makes the message container not interactive, which would normally open the new thread popup when clicked. */
}
.ChatChannelMessagesList-message-status-bar-visible .ChatChannelMessagesList-messages {
transform: unset;
}
.ChatChannelMessagesList-message-status-bar-visible .ChatChannelMessagesList-messages :last-child>.ChatV2Message-container-replying:last-child {
margin-bottom: 29px; /* Only last message moves the channel contents so it's less disorienting when replying to older messages */
}
/* Specific message elements */
.ChatV2Message-container :is(
.MediaRenderer-wrapper,
.CodeContainerRenderer-language-indicator,
.LinkRenderer,
.EmbedCard-container,
.MentionV2-container,
.ChannelPill-container,
.DefaultContentEmbedCard-container,
.ChatMessageThread-container,
.Editor-container,
.ChatV2MessageEditHelper-container,
.ChatV2MessageReplyHeader-container,
.PrismTokenUrlRenderer-link,
.ChatEmbedAuthor-link,
.ChatEmbedContent-link,
.MaximizableImage-image,
.TeamEmbedCard-container,
.CustomFormWrapper-container,
.ReactionRenderer,
.FileUploadRenderer-container
) {
pointer-events: auto;
}
.ChatV2Message-reply-headers {
position: relative;
z-index: 1;
pointer-events: none;
}
.PinnedByMessage-container {
pointer-events: none;
}
.ChatV2MessageReplyHeader-container {
max-width: max-content;
}
.ChatV2Message-container .ReactionsRowV2-badge {
z-index: 1;
}
/* Misc */
.PortalTarget-container {
top: -100px;
/* Moves the reply button tooltip slightly higher, since there's a small chance that it would flicker in the top left corner while the inline style is still missing. */
}