2023-04-10 16:31:45 +00:00
|
|
|
// Copyright 2023 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
.MessageTextRenderer {
|
|
|
|
&__formatting {
|
2023-04-14 18:16:28 +00:00
|
|
|
// bold is handled by <strong> element
|
|
|
|
// italic is handled by <em> element
|
|
|
|
// strikethrough is handled by <s> element
|
|
|
|
|
2023-04-10 16:31:45 +00:00
|
|
|
&--monospace {
|
2023-04-18 01:16:41 +00:00
|
|
|
font-family: $monospace;
|
2023-04-10 16:31:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Note: only used in the left pane for search results, not in message bubbles
|
2023-05-10 00:40:19 +00:00
|
|
|
// Note: This is referenced in formatting/matchers.ts, to detect these styles on paste
|
2023-04-10 16:31:45 +00:00
|
|
|
&--keywordHighlight {
|
2023-04-14 18:16:28 +00:00
|
|
|
// Boldness of this is handled by <strong> element
|
2023-04-10 16:31:45 +00:00
|
|
|
|
|
|
|
// To differentiate it from bold formatting, we increase the color contrast
|
|
|
|
@include light-theme {
|
|
|
|
color: $color-black; // vs color-gray-60 normally
|
|
|
|
}
|
|
|
|
@include dark-theme {
|
|
|
|
color: $color-white; // vs color-gray-25 normally
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Note: Spoiler must be last to override any other formatting applied to the section
|
|
|
|
&--spoiler {
|
|
|
|
cursor: pointer;
|
|
|
|
|
2023-05-10 00:40:19 +00:00
|
|
|
// Prepare for our inner copy target
|
|
|
|
position: relative;
|
|
|
|
|
2023-04-14 18:16:28 +00:00
|
|
|
// Lighten things up a bit
|
|
|
|
opacity: 50%;
|
|
|
|
border-radius: 4px;
|
|
|
|
|
2023-04-10 16:31:45 +00:00
|
|
|
// make child text invisible
|
|
|
|
color: transparent;
|
|
|
|
|
|
|
|
// fix outline
|
|
|
|
outline: none;
|
|
|
|
|
|
|
|
@include keyboard-mode {
|
|
|
|
&:focus {
|
|
|
|
box-shadow: 0 0 0px 1px $color-ultramarine;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-10 00:40:19 +00:00
|
|
|
// Note: This is referenced in formatting/matchers.ts, to detect these styles on paste
|
2023-04-10 16:31:45 +00:00
|
|
|
&--spoiler--noninteractive {
|
2023-04-18 01:16:41 +00:00
|
|
|
cursor: inherit;
|
2023-04-10 16:31:45 +00:00
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
// The simplest; always in dark mode
|
|
|
|
&--spoiler-StoryViewer {
|
|
|
|
background-color: $color-white;
|
|
|
|
}
|
2023-05-10 00:40:19 +00:00
|
|
|
&--spoiler-MediaEditor {
|
|
|
|
background-color: $color-gray-15;
|
|
|
|
}
|
2023-04-10 16:31:45 +00:00
|
|
|
|
|
|
|
// The left pane
|
|
|
|
&--spoiler-ConversationList,
|
|
|
|
&--spoiler-SearchResult {
|
|
|
|
@include light-theme {
|
|
|
|
background-color: $color-gray-60;
|
|
|
|
}
|
|
|
|
@include dark-theme {
|
|
|
|
background-color: $color-gray-25;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// The timeline
|
|
|
|
&--spoiler-Quote {
|
|
|
|
@include light-theme {
|
|
|
|
background-color: $color-gray-90;
|
|
|
|
}
|
|
|
|
@include dark-theme {
|
|
|
|
background-color: $color-gray-05;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&--spoiler-Timeline--incoming {
|
|
|
|
@include light-theme {
|
|
|
|
background-color: $color-gray-90;
|
|
|
|
}
|
|
|
|
@include dark-theme {
|
|
|
|
background-color: $color-gray-05;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&--spoiler-Timeline--outgoing {
|
|
|
|
@include light-theme {
|
|
|
|
background-color: rgba(255, 255, 255, 0.9);
|
|
|
|
}
|
|
|
|
@include dark-theme {
|
|
|
|
background-color: rgba(255, 255, 255, 0.9);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&--invisible {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|