2021-07-28 22:15:52 +09:00
|
|
|
@use '../../atoms/scroll/scrollbar';
|
2021-12-19 13:58:41 +09:00
|
|
|
@use '../../partials/text';
|
|
|
|
@use '../../partials/dir';
|
2021-07-28 22:15:52 +09:00
|
|
|
|
|
|
|
.message,
|
|
|
|
.ph-msg {
|
2021-12-19 13:58:41 +09:00
|
|
|
padding: var(--sp-ultra-tight);
|
|
|
|
@include dir.side(padding, var(--sp-normal), var(--sp-extra-tight));
|
2021-07-28 22:15:52 +09:00
|
|
|
display: flex;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: var(--bg-surface-hover);
|
2021-08-11 16:59:01 +09:00
|
|
|
& .message__options {
|
|
|
|
display: flex;
|
|
|
|
}
|
2021-07-28 22:15:52 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
&__avatar-container {
|
|
|
|
padding-top: 6px;
|
2021-12-19 13:58:41 +09:00
|
|
|
@include dir.side(margin, 0, var(--sp-tight));
|
|
|
|
|
2021-12-08 17:32:44 +09:00
|
|
|
& .avatar-container {
|
|
|
|
transition: transform 200ms var(--fluid-push);
|
|
|
|
&:hover {
|
|
|
|
transform: translateY(-4px);
|
|
|
|
}
|
|
|
|
}
|
2021-07-28 22:15:52 +09:00
|
|
|
|
2021-10-19 00:25:52 +09:00
|
|
|
& button {
|
|
|
|
cursor: pointer;
|
2021-11-18 17:02:12 +09:00
|
|
|
display: flex;
|
2021-10-19 00:25:52 +09:00
|
|
|
}
|
2021-07-28 22:15:52 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
&__main-container {
|
|
|
|
flex: 1;
|
|
|
|
min-width: 0;
|
2021-08-11 16:59:01 +09:00
|
|
|
|
|
|
|
position: relative;
|
2021-07-28 22:15:52 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.message {
|
|
|
|
&--full + &--full,
|
2021-11-20 16:59:32 +09:00
|
|
|
&--body-only + &--full,
|
2021-07-28 22:15:52 +09:00
|
|
|
& + .timeline-change,
|
|
|
|
.timeline-change + & {
|
|
|
|
margin-top: var(--sp-normal);
|
|
|
|
}
|
|
|
|
&__avatar-container {
|
|
|
|
width: var(--av-small);
|
|
|
|
}
|
2021-12-03 22:00:05 +09:00
|
|
|
&--focus {
|
2021-12-19 13:58:41 +09:00
|
|
|
--ltr: inset 2px 0 0 var(--bg-caution);
|
|
|
|
--rtl: inset -2px 0 0 var(--bg-caution);
|
|
|
|
@include dir.prop(box-shadow, var(--ltr), var(--rtl));
|
2021-12-03 22:00:05 +09:00
|
|
|
background-color: var(--bg-caution-hover);
|
|
|
|
}
|
2021-07-28 22:15:52 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.ph-msg {
|
|
|
|
&__avatar {
|
|
|
|
width: var(--av-small);
|
|
|
|
height: var(--av-small);
|
|
|
|
background-color: var(--bg-surface-hover);
|
|
|
|
border-radius: var(--bo-radius);
|
|
|
|
}
|
|
|
|
|
|
|
|
&__header,
|
2021-11-20 16:59:32 +09:00
|
|
|
&__body > div {
|
2021-12-19 13:58:41 +09:00
|
|
|
margin: var(--sp-ultra-tight);
|
|
|
|
@include dir.side(margin, 0, var(--sp-extra-tight));
|
2021-07-28 22:15:52 +09:00
|
|
|
height: var(--fs-b1);
|
|
|
|
width: 100%;
|
|
|
|
max-width: 100px;
|
|
|
|
background-color: var(--bg-surface-hover);
|
|
|
|
border-radius: calc(var(--bo-radius) / 2);
|
|
|
|
}
|
2021-11-20 16:59:32 +09:00
|
|
|
&__body {
|
2021-07-28 22:15:52 +09:00
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
}
|
2021-11-20 16:59:32 +09:00
|
|
|
&__body > div:nth-child(1n) {
|
2021-07-28 22:15:52 +09:00
|
|
|
max-width: 10%;
|
|
|
|
}
|
2021-11-20 16:59:32 +09:00
|
|
|
&__body > div:nth-child(2n) {
|
2021-07-28 22:15:52 +09:00
|
|
|
max-width: 50%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-10 20:28:44 +09:00
|
|
|
.message__reply,
|
2021-11-20 16:59:32 +09:00
|
|
|
.message__body,
|
2021-12-03 22:00:05 +09:00
|
|
|
.message__body__wrapper,
|
2021-08-20 22:42:07 +09:00
|
|
|
.message__edit,
|
2021-08-10 20:28:44 +09:00
|
|
|
.message__reactions {
|
2021-11-15 13:11:12 +09:00
|
|
|
max-width: calc(100% - 88px);
|
2021-08-12 15:42:59 +09:00
|
|
|
min-width: 0;
|
2021-12-26 19:46:58 +09:00
|
|
|
@media (max-width: 1124px) {
|
|
|
|
max-width: 100%;
|
|
|
|
}
|
2021-08-10 20:28:44 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-07-28 22:15:52 +09:00
|
|
|
.message__header {
|
|
|
|
display: flex;
|
|
|
|
align-items: baseline;
|
|
|
|
|
|
|
|
& .message__profile {
|
|
|
|
min-width: 0;
|
|
|
|
color: var(--tc-surface-high);
|
2021-12-19 13:58:41 +09:00
|
|
|
@include dir.side(margin, 0, var(--sp-tight));
|
2021-07-28 22:15:52 +09:00
|
|
|
|
2021-12-18 13:40:23 +09:00
|
|
|
& > span {
|
2021-12-19 13:58:41 +09:00
|
|
|
@extend .cp-txt__ellipsis;
|
2021-07-28 22:15:52 +09:00
|
|
|
color: inherit;
|
|
|
|
}
|
2021-12-18 13:40:23 +09:00
|
|
|
& > span:last-child { display: none; }
|
2021-08-11 17:28:53 +09:00
|
|
|
&:hover {
|
2021-12-18 13:40:23 +09:00
|
|
|
& > span:first-child { display: none; }
|
|
|
|
& > span:last-child { display: block; }
|
2021-08-11 17:28:53 +09:00
|
|
|
}
|
2021-07-28 22:15:52 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
& .message__time {
|
2021-08-11 17:28:53 +09:00
|
|
|
flex: 1;
|
|
|
|
display: flex;
|
|
|
|
justify-content: flex-end;
|
2021-07-28 22:15:52 +09:00
|
|
|
& > .text {
|
2021-08-11 17:28:53 +09:00
|
|
|
white-space: nowrap;
|
2021-07-28 22:15:52 +09:00
|
|
|
color: var(--tc-surface-low);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-08-10 20:28:44 +09:00
|
|
|
.message__reply {
|
2021-12-03 22:00:05 +09:00
|
|
|
&-wrapper {
|
|
|
|
min-height: 20px;
|
|
|
|
cursor: pointer;
|
|
|
|
&:empty {
|
|
|
|
border-radius: calc(var(--bo-radius) / 2);
|
|
|
|
background-color: var(--bg-surface-hover);
|
|
|
|
max-width: 200px;
|
|
|
|
cursor: auto;
|
|
|
|
}
|
|
|
|
&:hover .text {
|
|
|
|
color: var(--tc-surface-high);
|
|
|
|
}
|
|
|
|
}
|
2021-08-10 20:28:44 +09:00
|
|
|
.text {
|
2021-12-19 13:58:41 +09:00
|
|
|
@extend .cp-txt__ellipsis;
|
2021-08-10 20:28:44 +09:00
|
|
|
color: var(--tc-surface-low);
|
|
|
|
}
|
|
|
|
.ic-raw {
|
|
|
|
width: 16px;
|
|
|
|
height: 14px;
|
|
|
|
}
|
|
|
|
}
|
2021-11-20 16:59:32 +09:00
|
|
|
.message__body {
|
2021-07-28 22:15:52 +09:00
|
|
|
word-break: break-word;
|
|
|
|
|
2021-12-12 22:15:43 +09:00
|
|
|
& > .text > * {
|
|
|
|
white-space: pre-wrap;
|
|
|
|
}
|
|
|
|
|
2021-07-28 22:15:52 +09:00
|
|
|
& a {
|
2021-10-27 22:31:45 +09:00
|
|
|
word-break: break-word;
|
2021-07-28 22:15:52 +09:00
|
|
|
}
|
2021-12-28 14:24:46 +09:00
|
|
|
& > .text > a {
|
|
|
|
white-space: initial !important;
|
|
|
|
}
|
|
|
|
|
2021-11-21 18:00:21 +09:00
|
|
|
& span[data-mx-pill] {
|
|
|
|
background-color: hsla(0, 0%, 64%, 0.15);
|
|
|
|
padding: 0 2px;
|
|
|
|
border-radius: 4px;
|
|
|
|
cursor: pointer;
|
2021-12-16 21:25:16 +09:00
|
|
|
font-weight: var(--fw-medium);
|
2021-11-21 18:00:21 +09:00
|
|
|
&:hover {
|
|
|
|
background-color: hsla(0, 0%, 64%, 0.3);
|
|
|
|
color: var(--tc-surface-high);
|
|
|
|
}
|
2021-11-23 15:26:02 +09:00
|
|
|
|
|
|
|
&[data-mx-ping] {
|
|
|
|
background-color: var(--bg-ping);
|
|
|
|
&:hover {
|
|
|
|
background-color: var(--bg-ping-hover);
|
|
|
|
}
|
|
|
|
}
|
2021-11-21 18:00:21 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
& span[data-mx-spoiler] {
|
|
|
|
border-radius: 4px;
|
|
|
|
background-color: rgba(124, 124, 124, 0.5);
|
|
|
|
color:transparent;
|
2021-12-13 18:44:57 +09:00
|
|
|
cursor: pointer;
|
2021-11-21 18:00:21 +09:00
|
|
|
-webkit-touch-callout: none;
|
|
|
|
-webkit-user-select: none;
|
|
|
|
-khtml-user-select: none;
|
|
|
|
-moz-user-select: none;
|
|
|
|
-ms-user-select: none;
|
|
|
|
user-select: none;
|
|
|
|
& > * {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
2021-12-13 18:44:57 +09:00
|
|
|
}
|
2021-12-27 13:54:07 +09:00
|
|
|
|
2021-12-13 18:44:57 +09:00
|
|
|
.data-mx-spoiler--visible {
|
|
|
|
background-color: var(--bg-surface-active) !important;
|
|
|
|
color: inherit !important;
|
|
|
|
user-select: initial !important;
|
|
|
|
& > * {
|
|
|
|
opacity: inherit !important;
|
2021-11-21 18:00:21 +09:00
|
|
|
}
|
|
|
|
}
|
2021-08-11 16:59:01 +09:00
|
|
|
&-edited {
|
|
|
|
color: var(--tc-surface-low);
|
|
|
|
}
|
2021-07-28 22:15:52 +09:00
|
|
|
}
|
2021-08-20 22:42:07 +09:00
|
|
|
.message__edit {
|
|
|
|
padding: var(--sp-extra-tight) 0;
|
|
|
|
&-btns button {
|
2021-12-19 13:58:41 +09:00
|
|
|
margin: var(--sp-tight) 0 0 0;
|
|
|
|
@include dir.side(margin, 0, var(--sp-tight));
|
2021-08-20 22:42:07 +09:00
|
|
|
}
|
|
|
|
}
|
2021-08-10 20:28:44 +09:00
|
|
|
.message__reactions {
|
|
|
|
display: flex;
|
2021-08-15 17:29:09 +09:00
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
|
|
& .ic-btn-surface {
|
|
|
|
display: none;
|
|
|
|
padding: var(--sp-ultra-tight);
|
|
|
|
margin-top: var(--sp-extra-tight);
|
|
|
|
}
|
|
|
|
&:hover .ic-btn-surface {
|
|
|
|
display: block;
|
|
|
|
}
|
2021-08-10 20:28:44 +09:00
|
|
|
}
|
2021-07-28 22:15:52 +09:00
|
|
|
.msg__reaction {
|
2021-12-19 13:58:41 +09:00
|
|
|
margin: var(--sp-extra-tight) 0 0 0;
|
|
|
|
@include dir.side(margin, 0, var(--sp-extra-tight));
|
2021-08-10 20:28:44 +09:00
|
|
|
padding: 0 var(--sp-ultra-tight);
|
|
|
|
min-height: 26px;
|
2021-07-28 22:15:52 +09:00
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
|
|
|
color: var(--tc-surface-normal);
|
2021-08-10 20:28:44 +09:00
|
|
|
background-color: var(--bg-surface-low);
|
2021-07-28 22:15:52 +09:00
|
|
|
border: 1px solid var(--bg-surface-border);
|
2021-08-10 20:28:44 +09:00
|
|
|
border-radius: 4px;
|
2021-07-28 22:15:52 +09:00
|
|
|
cursor: pointer;
|
|
|
|
|
2021-11-23 15:26:02 +09:00
|
|
|
& .react-emoji {
|
2021-12-24 13:48:07 +09:00
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
2021-08-10 20:28:44 +09:00
|
|
|
margin: 2px;
|
|
|
|
}
|
|
|
|
&-count {
|
|
|
|
margin: 0 var(--sp-ultra-tight);
|
|
|
|
color: var(--tc-surface-normal)
|
|
|
|
}
|
2021-11-23 15:26:02 +09:00
|
|
|
&-tooltip .react-emoji {
|
2021-12-24 13:48:07 +09:00
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
2021-08-10 20:28:44 +09:00
|
|
|
margin: 0 var(--sp-ultra-tight);
|
|
|
|
margin-bottom: -2px;
|
|
|
|
}
|
2021-07-28 22:15:52 +09:00
|
|
|
|
|
|
|
@media (hover: hover) {
|
|
|
|
&:hover {
|
|
|
|
background-color: var(--bg-surface-hover);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&:active {
|
|
|
|
background-color: var(--bg-surface-active)
|
|
|
|
}
|
|
|
|
|
|
|
|
&--active {
|
|
|
|
background-color: var(--bg-caution-active);
|
|
|
|
|
|
|
|
@media (hover: hover) {
|
|
|
|
&:hover {
|
|
|
|
background-color: var(--bg-caution-hover);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&:active {
|
|
|
|
background-color: var(--bg-caution-active)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-08-11 16:59:01 +09:00
|
|
|
.message__options {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
2021-12-19 13:58:41 +09:00
|
|
|
@include dir.prop(right, 60px, unset);
|
|
|
|
@include dir.prop(left, unset, 60px);
|
|
|
|
|
2021-12-03 22:00:05 +09:00
|
|
|
z-index: 99;
|
2021-08-11 16:59:01 +09:00
|
|
|
transform: translateY(-50%);
|
|
|
|
|
|
|
|
border-radius: var(--bo-radius);
|
|
|
|
box-shadow: var(--bs-surface-border);
|
|
|
|
background-color: var(--bg-surface-low);
|
|
|
|
display: none;
|
|
|
|
}
|
2021-07-28 22:15:52 +09:00
|
|
|
|
|
|
|
// markdown formating
|
2021-11-20 16:59:32 +09:00
|
|
|
.message__body {
|
2022-01-12 14:47:44 +09:00
|
|
|
& h1, h2, h3, h4, h5, h6 {
|
|
|
|
margin: 0;
|
|
|
|
margin-bottom: var(--sp-ultra-tight);
|
|
|
|
font-weight: var(--fw-medium);
|
|
|
|
&:first-child {
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
|
|
|
&:last-child {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
}
|
2021-07-28 22:15:52 +09:00
|
|
|
& h1,
|
|
|
|
& h2 {
|
|
|
|
color: var(--tc-surface-high);
|
2022-01-12 14:47:44 +09:00
|
|
|
margin-top: var(--sp-normal);
|
|
|
|
font-size: var(--fs-h2);
|
|
|
|
line-height: var(--lh-h2);
|
|
|
|
letter-spacing: var(--ls-h2);
|
2021-07-28 22:15:52 +09:00
|
|
|
}
|
|
|
|
& h3,
|
|
|
|
& h4 {
|
|
|
|
color: var(--tc-surface-high);
|
2022-01-12 14:47:44 +09:00
|
|
|
margin-top: var(--sp-tight);
|
|
|
|
font-size: var(--fs-s1);
|
|
|
|
line-height: var(--lh-s1);
|
|
|
|
letter-spacing: var(--ls-s1);
|
2021-07-28 22:15:52 +09:00
|
|
|
}
|
|
|
|
& h5,
|
|
|
|
& h6 {
|
|
|
|
color: var(--tc-surface-high);
|
2022-01-12 14:47:44 +09:00
|
|
|
margin-top: var(--sp-extra-tight);
|
|
|
|
font-size: var(--fs-b1);
|
|
|
|
line-height: var(--lh-b1);
|
|
|
|
letter-spacing: var(--ls-b1);
|
2021-07-28 22:15:52 +09:00
|
|
|
}
|
|
|
|
& hr {
|
2021-12-03 22:00:05 +09:00
|
|
|
border-color: var(--bg-divider);
|
2021-07-28 22:15:52 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.text img {
|
|
|
|
margin: var(--sp-ultra-tight) 0;
|
|
|
|
max-width: 296px;
|
|
|
|
border-radius: calc(var(--bo-radius) / 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
& p,
|
|
|
|
& pre,
|
|
|
|
& blockquote {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
& pre,
|
|
|
|
& blockquote {
|
|
|
|
margin: var(--sp-ultra-tight) 0;
|
|
|
|
padding: var(--sp-extra-tight);
|
|
|
|
background-color: var(--bg-surface-hover) !important;
|
|
|
|
border-radius: calc(var(--bo-radius) / 2);
|
|
|
|
}
|
|
|
|
& pre {
|
|
|
|
div {
|
|
|
|
background: none !important;
|
|
|
|
margin: 0 !important;
|
|
|
|
}
|
|
|
|
span {
|
|
|
|
background: none !important;
|
|
|
|
}
|
|
|
|
.linenumber {
|
|
|
|
min-width: 2.25em !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
& code {
|
|
|
|
padding: 0 !important;
|
|
|
|
color: var(--tc-code) !important;
|
|
|
|
white-space: pre-wrap;
|
|
|
|
@include scrollbar.scroll;
|
|
|
|
@include scrollbar.scroll__h;
|
|
|
|
@include scrollbar.scroll--auto-hide;
|
|
|
|
}
|
2021-11-21 18:00:21 +09:00
|
|
|
& pre {
|
|
|
|
display: inline-block;
|
|
|
|
max-width: 100%;
|
|
|
|
@include scrollbar.scroll;
|
|
|
|
@include scrollbar.scroll__h;
|
|
|
|
@include scrollbar.scroll--auto-hide;
|
|
|
|
& code {
|
|
|
|
color: var(--tc-surface-normal) !important;
|
|
|
|
white-space: pre;
|
|
|
|
}
|
2021-07-28 22:15:52 +09:00
|
|
|
}
|
|
|
|
& blockquote {
|
2021-11-21 18:00:21 +09:00
|
|
|
display: inline-block;
|
|
|
|
max-width: 100%;
|
2021-12-19 13:58:41 +09:00
|
|
|
@include dir.side(border, 4px solid var(--bg-surface-active), 0);
|
2021-07-28 22:15:52 +09:00
|
|
|
white-space: initial !important;
|
|
|
|
|
|
|
|
& > * {
|
|
|
|
white-space: pre-wrap;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
& ul,
|
|
|
|
& ol {
|
|
|
|
margin: var(--sp-ultra-tight) 0;
|
2021-12-19 13:58:41 +09:00
|
|
|
@include dir.side(padding, 24px, 0);
|
2021-07-28 22:15:52 +09:00
|
|
|
white-space: initial !important;
|
|
|
|
}
|
2021-08-17 18:40:44 +09:00
|
|
|
& ul.contains-task-list {
|
|
|
|
padding: 0;
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
& table {
|
2021-11-21 18:57:03 +09:00
|
|
|
display: inline-block;
|
|
|
|
max-width: 100%;
|
|
|
|
white-space: normal !important;
|
2021-08-17 18:40:44 +09:00
|
|
|
background-color: var(--bg-surface-hover);
|
|
|
|
border-radius: calc(var(--bo-radius) / 2);
|
|
|
|
border-spacing: 0;
|
|
|
|
border: 1px solid var(--bg-surface-border);
|
2021-11-21 18:00:21 +09:00
|
|
|
@include scrollbar.scroll;
|
|
|
|
@include scrollbar.scroll__h;
|
|
|
|
@include scrollbar.scroll--auto-hide;
|
2021-08-17 18:40:44 +09:00
|
|
|
|
|
|
|
& td, & th {
|
|
|
|
padding: var(--sp-extra-tight);
|
|
|
|
border: 1px solid var(--bg-surface-border);
|
|
|
|
border-width: 0 1px 1px 0;
|
2021-11-21 18:00:21 +09:00
|
|
|
white-space: pre;
|
2021-08-17 18:40:44 +09:00
|
|
|
&:last-child {
|
|
|
|
border-width: 0;
|
|
|
|
border-bottom-width: 1px;
|
|
|
|
[dir=rtl] & {
|
|
|
|
border-width: 0 1px 1px 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
[dir=rtl] &:first-child {
|
|
|
|
border-width: 0;
|
|
|
|
border-bottom-width: 1px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
& tbody tr:nth-child(2n + 1) {
|
|
|
|
background-color: var(--bg-surface-hover);
|
|
|
|
}
|
|
|
|
& tr:last-child td {
|
|
|
|
border-bottom-width: 0px !important;
|
|
|
|
}
|
|
|
|
}
|
2021-10-27 22:31:45 +09:00
|
|
|
}
|
2021-11-14 14:02:32 +09:00
|
|
|
|
|
|
|
.message.message--type-emote {
|
2021-11-20 16:59:32 +09:00
|
|
|
.message__body {
|
2021-11-14 14:02:32 +09:00
|
|
|
font-style: italic;
|
|
|
|
|
|
|
|
// Remove blockness of first `<p>` so that markdown emotes stay on one line.
|
|
|
|
p:first-of-type {
|
|
|
|
display: inline;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|