2023-01-30 20:16:09 +00:00
|
|
|
// Copyright 2021 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
.module-composition-input {
|
|
|
|
&__quill {
|
|
|
|
height: 100%;
|
2023-04-20 17:03:43 +00:00
|
|
|
padding-inline-start: 12px;
|
2023-01-30 20:16:09 +00:00
|
|
|
|
|
|
|
.ql-editor {
|
|
|
|
caret-color: transparent;
|
|
|
|
padding: 0;
|
|
|
|
text-align: start;
|
|
|
|
white-space: break-spaces;
|
|
|
|
line-height: inherit;
|
|
|
|
|
|
|
|
&--loaded {
|
|
|
|
caret-color: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.ql-blank::before {
|
2023-04-20 17:03:43 +00:00
|
|
|
inset-inline: 0;
|
2023-01-30 20:16:09 +00:00
|
|
|
font-style: normal;
|
|
|
|
}
|
|
|
|
|
|
|
|
.emoji-blot {
|
|
|
|
width: 20px;
|
|
|
|
height: 20px;
|
|
|
|
vertical-align: text-bottom;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__at-mention {
|
|
|
|
background-color: $color-gray-20;
|
|
|
|
border-radius: 4px;
|
|
|
|
display: inline;
|
2023-04-20 17:03:43 +00:00
|
|
|
padding-inline: 4px;
|
2023-01-30 20:16:09 +00:00
|
|
|
height: 22px;
|
|
|
|
line-height: 22px;
|
|
|
|
|
|
|
|
@include dark-theme {
|
|
|
|
background-color: $color-gray-60;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__input {
|
|
|
|
$border-size: 1px;
|
|
|
|
|
|
|
|
border-radius: 18px;
|
|
|
|
overflow: hidden;
|
|
|
|
word-break: break-word;
|
|
|
|
|
|
|
|
// Override Quill styles
|
|
|
|
.ql-container {
|
|
|
|
@include font-body-1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.ql-blank::before {
|
|
|
|
@include light-theme() {
|
|
|
|
color: $color-gray-45;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include dark-theme() {
|
|
|
|
color: $color-gray-25;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@include light-theme() {
|
|
|
|
// Same as background color
|
|
|
|
background-color: $color-gray-05;
|
|
|
|
color: $color-gray-90;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include dark-theme() {
|
|
|
|
// Same as background color
|
|
|
|
background-color: $color-gray-75;
|
|
|
|
color: $color-gray-05;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__scroller {
|
|
|
|
$padding-top: 6px;
|
2023-04-20 17:03:43 +00:00
|
|
|
padding-block: $padding-top;
|
|
|
|
padding-inline: 0;
|
2023-01-30 20:16:09 +00:00
|
|
|
|
|
|
|
min-height: calc(32px - 2 * $border-size);
|
|
|
|
max-height: calc(72px - 2 * $border-size);
|
|
|
|
overflow: auto;
|
|
|
|
|
|
|
|
&::-webkit-scrollbar-thumb {
|
|
|
|
@include light-theme {
|
|
|
|
border: 2px solid $color-gray-05;
|
|
|
|
}
|
|
|
|
@include dark-theme {
|
|
|
|
border: 2px solid $color-gray-75;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&--large {
|
|
|
|
max-height: calc(212px - 2 * $border-size);
|
|
|
|
min-height: calc(212px - 2 * $border-size);
|
|
|
|
|
|
|
|
.DraftEditor-root {
|
|
|
|
height: calc(212px - 2 * $padding-top - 2 * $border-size);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&--link-preview {
|
2023-02-03 22:21:07 +00:00
|
|
|
padding-top: 0;
|
2023-01-30 20:16:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
border: $border-size solid transparent;
|
|
|
|
|
|
|
|
&:focus-within {
|
|
|
|
outline: 0;
|
|
|
|
@include keyboard-mode {
|
|
|
|
border: $border-size solid $color-ultramarine;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-10 00:40:19 +00:00
|
|
|
// Note: This is referenced in ModalHost to ensure 'external' clicks on it still work
|
2023-04-14 18:16:28 +00:00
|
|
|
&__format-menu {
|
2023-04-20 17:03:43 +00:00
|
|
|
padding-block: 6px;
|
|
|
|
padding-inline: 12px;
|
2023-04-14 18:16:28 +00:00
|
|
|
border-radius: 8px;
|
|
|
|
z-index: $z-index-above-popup;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
|
2023-05-10 00:40:19 +00:00
|
|
|
opacity: 0;
|
|
|
|
transition: opacity ease 200ms;
|
|
|
|
|
2023-04-14 18:16:28 +00:00
|
|
|
@include popper-shadow();
|
|
|
|
|
|
|
|
@include light-theme() {
|
|
|
|
background: $color-white;
|
|
|
|
}
|
|
|
|
@include dark-theme() {
|
2023-05-10 00:40:19 +00:00
|
|
|
background: $color-gray-65;
|
2023-04-14 18:16:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__item {
|
|
|
|
$parent: &;
|
|
|
|
@include button-reset;
|
|
|
|
|
|
|
|
height: 24px;
|
|
|
|
width: 24px;
|
|
|
|
border-radius: 4px;
|
|
|
|
|
2023-04-20 17:03:43 +00:00
|
|
|
margin-inline-end: 8px;
|
2023-04-14 18:16:28 +00:00
|
|
|
&:last-child {
|
2023-04-20 17:03:43 +00:00
|
|
|
margin-inline-end: 0;
|
2023-04-14 18:16:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@include mouse-mode {
|
|
|
|
&:hover {
|
|
|
|
background-color: $color-gray-05;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include dark-mouse-mode {
|
|
|
|
&:hover {
|
|
|
|
background-color: $color-gray-60;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-10 00:40:19 +00:00
|
|
|
&__popover {
|
|
|
|
@include font-subtitle-bold;
|
|
|
|
padding-block: 5px;
|
|
|
|
padding-inline: 8px;
|
|
|
|
text-align: center;
|
|
|
|
border-radius: 4px;
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
|
|
|
@include light-theme {
|
|
|
|
background-color: $color-black;
|
|
|
|
color: $color-gray-05;
|
|
|
|
}
|
|
|
|
@include dark-theme {
|
|
|
|
background-color: $color-gray-65;
|
|
|
|
color: $color-gray-05;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__shortcut {
|
|
|
|
@include font-caption-bold;
|
|
|
|
|
|
|
|
@include light-theme {
|
|
|
|
color: $color-gray-15;
|
|
|
|
}
|
|
|
|
@include dark-theme {
|
|
|
|
color: $color-gray-25;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-14 18:16:28 +00:00
|
|
|
&__icon {
|
|
|
|
height: 20px;
|
|
|
|
width: 20px;
|
|
|
|
margin: 2px;
|
|
|
|
|
|
|
|
&--bold {
|
|
|
|
@include dark-theme {
|
2023-05-04 18:04:22 +00:00
|
|
|
@include color-svg(
|
|
|
|
'../images/icons/v3/text_format/textformat-bold-bold.svg',
|
|
|
|
$color-gray-25
|
|
|
|
);
|
2023-04-14 18:16:28 +00:00
|
|
|
}
|
|
|
|
@include light-theme {
|
2023-05-04 18:04:22 +00:00
|
|
|
@include color-svg(
|
|
|
|
'../images/icons/v3/text_format/textformat-bold-bold.svg',
|
|
|
|
$color-gray-60
|
|
|
|
);
|
2023-04-14 18:16:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&--italic {
|
|
|
|
@include dark-theme {
|
2023-05-04 18:04:22 +00:00
|
|
|
@include color-svg(
|
|
|
|
'../images/icons/v3/text_format/textformat-italic.svg',
|
|
|
|
$color-gray-25
|
|
|
|
);
|
2023-04-14 18:16:28 +00:00
|
|
|
}
|
|
|
|
@include light-theme {
|
2023-05-04 18:04:22 +00:00
|
|
|
@include color-svg(
|
|
|
|
'../images/icons/v3/text_format/textformat-italic.svg',
|
|
|
|
$color-gray-60
|
|
|
|
);
|
2023-04-14 18:16:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-10 00:40:19 +00:00
|
|
|
&--strike {
|
2023-04-14 18:16:28 +00:00
|
|
|
@include dark-theme {
|
|
|
|
@include color-svg(
|
2023-05-04 18:04:22 +00:00
|
|
|
'../images/icons/v3/text_format/textformat-strikethrough.svg',
|
2023-04-14 18:16:28 +00:00
|
|
|
$color-gray-25
|
|
|
|
);
|
|
|
|
}
|
|
|
|
@include light-theme {
|
|
|
|
@include color-svg(
|
2023-05-04 18:04:22 +00:00
|
|
|
'../images/icons/v3/text_format/textformat-strikethrough.svg',
|
2023-04-14 18:16:28 +00:00
|
|
|
$color-gray-60
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&--monospace {
|
|
|
|
@include dark-theme {
|
|
|
|
@include color-svg(
|
2023-05-04 18:04:22 +00:00
|
|
|
'../images/icons/v3/text_format/textformat-monospace.svg',
|
2023-04-14 18:16:28 +00:00
|
|
|
$color-gray-25
|
|
|
|
);
|
|
|
|
}
|
|
|
|
@include light-theme {
|
|
|
|
@include color-svg(
|
2023-05-04 18:04:22 +00:00
|
|
|
'../images/icons/v3/text_format/textformat-monospace.svg',
|
2023-04-14 18:16:28 +00:00
|
|
|
$color-gray-60
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&--spoiler {
|
|
|
|
@include dark-theme {
|
|
|
|
@include color-svg(
|
2023-05-04 18:04:22 +00:00
|
|
|
'../images/icons/v3/text_format/textformat-spoiler.svg',
|
2023-04-14 18:16:28 +00:00
|
|
|
$color-gray-25
|
|
|
|
);
|
|
|
|
}
|
|
|
|
@include light-theme {
|
|
|
|
@include color-svg(
|
2023-05-04 18:04:22 +00:00
|
|
|
'../images/icons/v3/text_format/textformat-spoiler.svg',
|
2023-04-14 18:16:28 +00:00
|
|
|
$color-gray-60
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Here we look at hover for the parent so the 2px border in between is active
|
|
|
|
// We can't use the mixins because .mouse-mode would wend up after the >
|
|
|
|
.mouse-mode #{$parent}:hover & {
|
|
|
|
background-color: $color-gray-90;
|
|
|
|
}
|
|
|
|
.dark-theme.mouse-mode #{$parent}:hover & {
|
|
|
|
background-color: $color-gray-15;
|
|
|
|
}
|
|
|
|
|
|
|
|
&--active {
|
|
|
|
@include dark-theme {
|
2023-05-10 00:40:19 +00:00
|
|
|
background-color: $color-ultramarine-light;
|
2023-04-14 18:16:28 +00:00
|
|
|
}
|
|
|
|
@include light-theme {
|
|
|
|
background-color: $color-ultramarine;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Override above hover behaviors
|
|
|
|
.mouse-mode #{$parent}:hover & {
|
|
|
|
background-color: $color-ultramarine;
|
|
|
|
}
|
|
|
|
.dark-theme.mouse-mode #{$parent}:hover & {
|
2023-05-10 00:40:19 +00:00
|
|
|
background-color: $color-ultramarine-light;
|
2023-04-14 18:16:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-10 00:40:19 +00:00
|
|
|
// Note: This is referenced in ModalHost to ensure 'external' clicks on it still work
|
2023-01-30 20:16:09 +00:00
|
|
|
&__suggestions {
|
|
|
|
padding: 0;
|
|
|
|
margin-bottom: 6px;
|
|
|
|
border-radius: 8px;
|
|
|
|
z-index: $z-index-above-popup;
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
&--scroller {
|
|
|
|
max-height: 300px;
|
|
|
|
overflow-y: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include popper-shadow();
|
|
|
|
|
|
|
|
@include light-theme() {
|
|
|
|
background: $color-white;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include dark-theme() {
|
|
|
|
background: $color-gray-75;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__row {
|
|
|
|
height: 34px;
|
2023-04-20 17:03:43 +00:00
|
|
|
padding-block: 0;
|
|
|
|
padding-inline: 12px;
|
2023-01-30 20:16:09 +00:00
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: flex-start;
|
|
|
|
background: none;
|
|
|
|
border: none;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
&--mention {
|
|
|
|
height: 40px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
outline: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include font-body-2;
|
|
|
|
|
|
|
|
@include light-theme() {
|
|
|
|
color: $color-gray-60;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include dark-theme() {
|
|
|
|
color: $color-gray-25;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__short-name {
|
2023-04-20 17:03:43 +00:00
|
|
|
margin-inline-start: 4px;
|
2023-01-30 20:16:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&--selected,
|
|
|
|
&:hover {
|
|
|
|
@include light-theme() {
|
|
|
|
background: $color-gray-05;
|
|
|
|
color: $color-gray-90;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include dark-theme() {
|
|
|
|
background: $color-gray-60;
|
|
|
|
color: $color-gray-05;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__title {
|
2023-04-20 17:03:43 +00:00
|
|
|
padding-inline-start: 8px;
|
2023-01-30 20:16:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stroke: $color-white;
|
|
|
|
}
|
2023-04-20 16:31:59 +00:00
|
|
|
|
|
|
|
&__editing-message {
|
|
|
|
@include font-body-2-bold;
|
|
|
|
margin-top: 10px;
|
|
|
|
user-select: none;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: '';
|
|
|
|
display: inline-block;
|
|
|
|
height: 16px;
|
2023-04-20 17:03:43 +00:00
|
|
|
margin-block: 0;
|
|
|
|
margin-inline: 10px 8px;
|
2023-04-20 16:31:59 +00:00
|
|
|
width: 16px;
|
|
|
|
vertical-align: middle;
|
|
|
|
|
2023-05-04 18:04:22 +00:00
|
|
|
@include color-svg('../images/icons/v3/edit/edit.svg', $color-black);
|
2023-04-20 16:31:59 +00:00
|
|
|
|
|
|
|
@include dark-theme {
|
2023-05-04 18:04:22 +00:00
|
|
|
@include color-svg('../images/icons/v3/edit/edit.svg', $color-gray-15);
|
2023-04-20 16:31:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__attachment img {
|
|
|
|
height: 18px;
|
|
|
|
position: absolute;
|
2023-04-20 17:03:43 +00:00
|
|
|
inset-inline-end: 8px;
|
2023-04-20 16:31:59 +00:00
|
|
|
top: 8px;
|
|
|
|
width: 18px;
|
|
|
|
}
|
|
|
|
}
|
2023-01-30 20:16:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
div.CompositionInput__link-preview {
|
|
|
|
background: $color-gray-02;
|
|
|
|
border-radius: 8px;
|
|
|
|
flex-direction: row-reverse;
|
2023-02-01 17:19:02 +00:00
|
|
|
justify-content: space-between;
|
2023-02-03 22:21:07 +00:00
|
|
|
margin: 6px;
|
|
|
|
min-height: 74px;
|
2023-01-30 20:16:09 +00:00
|
|
|
overflow: hidden;
|
|
|
|
|
2023-02-01 17:19:02 +00:00
|
|
|
@include dark-theme {
|
|
|
|
background: $color-gray-80;
|
|
|
|
}
|
|
|
|
|
2023-01-30 20:16:09 +00:00
|
|
|
&__icon-container {
|
|
|
|
align-items: center;
|
|
|
|
display: flex;
|
2023-04-20 17:03:43 +00:00
|
|
|
margin-inline: 8px 0;
|
2023-01-30 20:16:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__content {
|
2023-04-20 17:03:43 +00:00
|
|
|
margin-inline-end: 0;
|
2023-01-30 20:16:09 +00:00
|
|
|
padding-bottom: 8px;
|
2023-04-20 17:03:43 +00:00
|
|
|
padding-inline-start: 12px;
|
2023-01-30 20:16:09 +00:00
|
|
|
padding-top: 8px;
|
|
|
|
}
|
2023-02-03 22:21:07 +00:00
|
|
|
|
|
|
|
&__no-image {
|
2023-04-20 17:03:43 +00:00
|
|
|
margin-inline-end: 0;
|
2023-02-07 19:50:35 +00:00
|
|
|
min-width: 74px;
|
2023-02-03 22:21:07 +00:00
|
|
|
}
|
2023-01-30 20:16:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
button.CompositionInput__link-preview__close-button {
|
|
|
|
-webkit-mask: none;
|
|
|
|
@include rounded-corners;
|
|
|
|
align-items: center;
|
|
|
|
backdrop-filter: blur(32px);
|
|
|
|
background: $color-white-alpha-80;
|
|
|
|
display: flex;
|
|
|
|
height: 20px;
|
|
|
|
justify-content: center;
|
2023-04-20 17:03:43 +00:00
|
|
|
inset-inline-end: 6px;
|
2023-01-30 20:16:09 +00:00
|
|
|
top: 6px;
|
|
|
|
width: 20px;
|
|
|
|
|
|
|
|
&::before {
|
2023-05-04 18:04:22 +00:00
|
|
|
@include color-svg('../images/icons/v3/x/x.svg', $color-gray-75);
|
2023-01-30 20:16:09 +00:00
|
|
|
content: '';
|
|
|
|
height: 16px;
|
|
|
|
width: 16px;
|
2023-02-07 19:50:35 +00:00
|
|
|
|
|
|
|
@include dark-theme {
|
|
|
|
background-color: $color-gray-05;
|
|
|
|
}
|
2023-01-30 20:16:09 +00:00
|
|
|
}
|
|
|
|
}
|
2023-04-14 18:16:28 +00:00
|
|
|
|
2023-05-10 00:40:19 +00:00
|
|
|
// Note: These are referenced in formatting/matchers.ts, to detect these styles on paste
|
2023-04-14 18:16:28 +00:00
|
|
|
.quill {
|
|
|
|
&--monospace {
|
2023-04-18 01:16:41 +00:00
|
|
|
font-family: $monospace;
|
2023-04-14 18:16:28 +00:00
|
|
|
}
|
|
|
|
&--spoiler {
|
|
|
|
@include light-theme {
|
|
|
|
// vs color/$color-gray-90, background/$color-gray-05
|
|
|
|
background-color: $color-gray-25;
|
|
|
|
}
|
|
|
|
@include dark-theme {
|
|
|
|
// vs color/$color-gray-05, background/$color-gray-95
|
|
|
|
background-color: $color-gray-45;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|